I'm running the following query and getting an output mentioned below the SQL Query and is explained as follows:
Timestamp: Name of the column which is holding all date and time related values. MyDatabase: Name of the database Events: Name of another column with the name "Events" holding various values like, FIRST, SECOND,THIRD etc. I have mentioned FIRST here for convinience and clarity.
SELECT count(Timestamp) as COUNT,Timestamp
FROM MyDatabase
WHERE EVENTS = "FIRST" GROUP BY Timestamp ;
For example, the output I'm getting is as follows:
COUNT TIMESTAMP
___________________________
1 1 2013-06-06 11:51:37.0
2 2 2013-06-06 11:51:39.0
3 2 2013-06-06 11:51:37.0
and so on....
After long list of occurance of date "2013-06-06", the date changes to "2013-06-07"
The output above is time specific but I want it to be date specific and write down my SQL query in such a way that my desired output should be as follows:
COUNT TIMESTAMP
___________________________
1 6 2013-06-06 ( Sum of all the "COUNT" values corresponding to the date 2013-06-06)
2 8 2013-06-10 ( Sum of all the "COUNT" values corresponding to the date 2013-06-10 )
Could you please tell me what could be the modification required so that above output is achieved?