I have a question about retrieving data using SQL
i want to get
count(comments_id) where comment_year = 2012 and
count(comments_id) where comment_year = 2013
in one query to get the output like this:
year12_comments | year13_comments
7 | 8
I hope its clear.
If you are using
MS SQL Server 2005or above, you can usePIVOT