The simple database has a few columns ID, Created, Name and Primary_Interest. The Primary Interest column has items that include Family Photo Session, Maternity Photo Session, Prom Photo Session and Graduation Photo Session. I am trying to figure out how to display column item group counts from Primary_Interest by month and the current calendar year only.
The code below works but shows the total count by group in the column. The date format in the Created column is YYYY-MM-DD HH-MI-SS. I just want the month and a count by group for Primary_Interest for the current year only. How would I do this?
SELECT Primary_Interest, Count(*) FROM xjxig_Request_Session GROUP BY Primary_Interest;
Any help is appreciated.