Jump to content

Counting the number of records per id

Recommended Posts

I have a huge file with multiple rows per CustomerIDs and Dates.

There's a second field called PRODUCT which has various two digits text codes.


I want to accomplish two things

1) Convert the date to YYYY-MM

2) for all the combinations of CustomerID and YYYY-MM, I want to count the number of times each PRODUCT occurs.   


Attached is a sample of 6-7 customers.  




Sample for Counting and SQL help.xlsx

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...