Data is Fun

Where data is fun.


June 07, 2020

SQL ‘Group by’ example

Example:
Find all the cost of acquiring a customer of customer type ‘business’

Select sum(cost), cust_type
From sales_table
where cust_type = ‘business’
group by cust_type

Leave a Reply

Your email address will not be published. Required fields are marked *