SELECT DATE(timestamp) Date, COUNT(DISTINCT ipNum) totalCOunt FROM tableName GROUP BY DATE(timestamp) SQLPiddle Демо