I have a SQL query table with order data, and I am trying to figure out how many of each type of order occurred each month. each order can have multiple rows. I am having difficulties getting it to count only unique orders.
Order# Date Type
1 6/1/16 OoC
1 6/1/16 OoC
2 5/16/16 HNA 213
5 4/13/16 HNA 456
3 6/12/16 ACC
How many OoC orders in June? the answer is 1.
How many HNA orders in April? The answer is 1.
the Attached Sample is a small amount of data compared to the actual table, everything is on a single sheet and only has a small amount of the 3 columns that are needed. The actual is a large table that will grow as data is added from the query.
Bookmarks