dcsimg
 

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

Home
Mobile Site | Full Site
Copyright 2018 © QuinStreet Inc. All Rights Reserved


×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.