Re: Do I need to use GROUP BY to do this?
yes Grant Giddens schrieb:
Hi, I have a table where I keep sales transactions, so I'm trying to do a query that will count the number of transactions per day. My test data looks like: What type of query do I need to get that information?
SELECT `sales_date`, COUNT(*) FROM `sales_activity` WHERE `sales_type` = 1 GROUP BY `sales_date` -- Sebastian Mendel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]