# SQL Notes: Exercise 5 - SELECT Misc

Name: __________________________________________

Write a SELECT statement which produces the results. Put each clause (FROM, WHERE, ...) on a separate line. Unless otherwise specified, use the example database from the book SQL: The Complete Reference.

1. List all the customers and how much business was done with each?

2. Who manages salesreps, but isn't the manager of an office?

3. What is the name of Sue Smith's first customer?

4. Which customer has placed the largest number of orders with the manager of the Los Angeles office?

5. Who (rep) sold the biggest order, and how much was it?

           SELECT rep, MAX(amount)
              FROM Orders
              GROUP BY rep
              HAVING ???????;  Looks like subselect