Show me all the ids, country and states for all the invoices!
select id, billing_country, billing_state from invoices;
Show me only those from the US?
select id, billing_country, billing_state from invoices where billing_country = "USA";
What are the different states these comes from?
select distinct billing_state from invoices where billing_country = "USA";
How many USA invoices are from each of them!
select billing_state, count(*) from invoices where billing_country = "USA" group by billing_state;