Link to home
Start Free TrialLog in
Avatar of fb1990
fb1990

asked on

Summary Report in SQL

I have an order database that contains customer_id, order_date, orders_fulfilled_cnt, orders_cancelled_cnt  I need to get a summary report that shows:

1. count of customers who have orders cancelled fulfilled and sum orders cancelled
2. count of customers who have orders fulfilled and sum orders filfilled

I could write and run the code twice, but I am wondering if there is a better way
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fb1990
fb1990

ASKER

Thanks for the suggestion.  I have used a combination of count(case when and sum(case when to solve the problem