brgdotnet
asked on
How to get a count based upon a grouping
I need to query a table similar to the one below. Basically I need to group the records below by the number of records
in each month. So the query would produce this result from the CustomerPurchases table. I can have the query display the month/year however how do I get the counts, of the number of records per month?
Purchase Per Month
5/2016 3
6/2016 1
7/2016 4
CustomerPurchases
1 | 2016-05-01 12:33:44:187 | Bartermore
2 | 2016-05-13 12:30:00:000 | Drake
3 | 2016-05-31 01:22:11:187 | Sami
4 | 2016-06-01 12:33:44:166 | Gabak
5 | 2016-07-01 11:28:44:144 | Laster
6 | 2016-07-11 12:34:45:186 | Gobo
7 | 2016-07-15 12:33:44:187 | Darmore
8 | 2016-07-15 12:33:44:175 | Grabson
in each month. So the query would produce this result from the CustomerPurchases table. I can have the query display the month/year however how do I get the counts, of the number of records per month?
Purchase Per Month
5/2016 3
6/2016 1
7/2016 4
CustomerPurchases
1 | 2016-05-01 12:33:44:187 | Bartermore
2 | 2016-05-13 12:30:00:000 | Drake
3 | 2016-05-31 01:22:11:187 | Sami
4 | 2016-06-01 12:33:44:166 | Gabak
5 | 2016-07-01 11:28:44:144 | Laster
6 | 2016-07-11 12:34:45:186 | Gobo
7 | 2016-07-15 12:33:44:187 | Darmore
8 | 2016-07-15 12:33:44:175 | Grabson
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
brgdotnet, if your problem has been solved please choose the comment or comments that helped you out.
Cheers
Cheers
ASKER
:)
Hi Brgdotnet,
Please confirm that you have no more questions to this thread. Thanks
Please confirm that you have no more questions to this thread. Thanks
The previous given advice should have resolved the author's original question.
ASKER