Monday, November 3, 2008

SQL: query

SELECT
(CONCAT( MONTH(date_time), "/", DAYOFMONTH(date_time) ,"/", YEAR(date_time))) as date,
COUNT(*), column_x, column_y
FROM table_x group by YEAR(date_time), MONTH(date_time), DAYOFMONTH(date_time), column_x, column_y;