Manish
Member • Sep 9, 2013
Help in Sql Query
I have a database table with following cols
Id, Name, Date (FORMAT: Y-m-d H:i:s)
Now I want to retrieve data of following form
Count Year
3 2013
5 2014
It is showing total no of records generated in different years
For eg If I have following data
1 Manish 2013-10-01 23:12:12
2 Tarun 2013-10-02 23:12:12
3 Pankaj 2014-10-02 23:12:12
4 Pankaj 2015-10-02 23:12:12,
Then it will return me following data
Count Year
2 2013
1 2014
1 2015
Is it possible?
Id, Name, Date (FORMAT: Y-m-d H:i:s)
Now I want to retrieve data of following form
Count Year
3 2013
5 2014
It is showing total no of records generated in different years
For eg If I have following data
1 Manish 2013-10-01 23:12:12
2 Tarun 2013-10-02 23:12:12
3 Pankaj 2014-10-02 23:12:12
4 Pankaj 2015-10-02 23:12:12,
Then it will return me following data
Count Year
2 2013
1 2014
1 2015
Is it possible?