SQLCourse
Interactive Online SQL Training
HOME News MS SQL Oracle DB2 Access MySQL PHP SQL Etc Scripts Links Forums DBA Talk
SQL Courses
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Free Newsletters:



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


SQL Course Curriculum
<<previous 1234567891011121314 next>>