i have a data in a table, column id and column date
id || date
1 || 2013-04-18 15:12:32.000
2 || 2013-04-18 15:13:02.000
3 || 2013-05-01 19:09:28.000
4 || 2013-05-01 19:09:46.000
5 || 2013-05-01 19:10:01.000
6 || 2013-05-01 19:10:17.000
7 || 2013-05-02 08:34:54.000
8 || 2013-05-02 08:35:12.000
9 || 2013-05-18 15:12:32.000
10 || 2013-05-18 15:13:02.000
how query to show only one day with count?or one row with count. so the result is.
|| date ||
1 || 2013-04-18 15:12:32.000 || 2
2 || 2013-05-01 19:09:28.000 || 4
3 || 2013-05-02 08:34:54.000 || 2
4 || 2013-05-18 15:13:02.000 || 2
i try in mysql and it works , there is my query.
SELECT id, GROUP_CONCAT( date ) AS date, COUNT( id ) AS count
FROM petak_tetap
GROUP BY DATE( date )
but when i try to sql server 2008, this query error
here is the error message
Msg 195, Level 15, State 10, Line 1
'GROUP_CONCAT' is not a recognized built-in function name.
how to fix that?