# Database: Exercises: GROUP BY, HAVING, subqueries

Name __________________________________________
These questions apply to either the Aviation Database or University Database.

1. How many different pilots has customer Mickey Mouse flown with?

   Pilots
   a value

2. How many hours (CHAR_HOURS_FLOWN) has each pilot flown as copilot?

   EMP_NUM | EMP_LNAME | EMP_FNAME | Hours
   etc

3. (1 point) Same as above, but only list those who have flown more than 10 hours as copilot.

   EMP_NUM | EMP_LNAME | EMP_FNAME | Hours
   etc

4. The university has a rule that students who have a GPA less than 1.5 may not register for more than 9 hours of credit (from `crs_credits` field). Write an SQL command that will find students who are violating this rule.

   stu_id | stu_lname | stu_fname | stu_gpa | Hours
   etc

5. Which courses offer the maximum number of credit hours (`crs_credits`)?

   crs_id | crs_credits
   etc