How to show column item counts

I have a simple database with a few columns ID, 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 each of the items with a count. This database will collect data over time and I want to be able to get counts for the items.

For example this code below works but only shows the count for the one item in the column. Is there a way to show each of the items from the column with the counts?

SELECT Primary_Interest, Count(*) FROM xjxig_Request_Session WHERE Primary_Interest=“Family Photo Session”;

Any help is appreciated.

You would add - GROUP BY Primary_Interest and remove the WHERE… clause.

1 Like

Thank you very much. Appreciate the quick reply.

Sponsor our Newsletter | Privacy Policy | Terms of Service