Number of Records By Year - Query Help

Last Post 13 Sep 2007 09:45 AM by vayumahesh. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
vayumahesh
New Member
New Member

--
13 Sep 2007 09:45 AM
Hi,

I have a table called 'suggestions' where I have 'suggestionDate' and some other fields. 'suggestionDate' has value like '9/12/2007'. The table will have information on number of suggestions per year. I need an output like 'Number of Suggestions Per Year' as follows.

2007 12

2006 9

2005 11

2004 10

How can I do that ? I have only a clue that I need to use DISTINCT, YEAR function, GROUP BY and ORDER BY. But, I could not figure out the exact query to get the above resultset. Please help.

Thanks

vmrao
You are not authorized to post a reply.

Acceptable Use Policy