laurenbattaglia
Technical User
I need to do a Distinct Count on order numbers. I have a table with order_id and line_id. What I need is the number of order with 1 line, 2 lines ect. I am at a loss on the distinct count of order_id.
order_id line_id
1001 1
1001 2
1001 3
1001 4
1002 1
1002 2
1003 1
1004 1
1004 2
1004 3
1004 4
1004 5
1005 1
1005 2
1005 3
1005 4
1006 1
1006 2
1007 1
1007 2
1007 3
1007 4
1007 5
1008 1
order_id line_id
1001 1
1001 2
1001 3
1001 4
1002 1
1002 2
1003 1
1004 1
1004 2
1004 3
1004 4
1004 5
1005 1
1005 2
1005 3
1005 4
1006 1
1006 2
1007 1
1007 2
1007 3
1007 4
1007 5
1008 1