HAVING Exercise Answers

Exercise #1

SELECT state, count(state)
FROM customers
GROUP BY state
HAVING count(state) > 1;

Exercise #2

SELECT item, max(price), min(price)
FROM items_ordered
GROUP BY item
HAVING max(price) > 190.00;

Exercise #3

SELECT customerid, count(customerid), sum(price)
FROM items_ordered
GROUP BY customerid
HAVING count(customerid) > 1;

 

Go Back to previous HAVING clause page

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved