Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

How to write SQL code to get combination sets

$
0
0

Hello. I have four columns (many more but 4 important ones). Sales number, unique sale number, type, and date. 

I want to return an output in SQL  that shows each different combination (based on order of date) and then the number of instances this combination occurrs in the data set. Is this possible? Here is a dummy picture of what my data set looks like (many more rows in SQL). 


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>