PlayBook Tutor II Questions

2

Click here to load reader

description

Playbook SQL Practice Questions

Transcript of PlayBook Tutor II Questions

Page 1: PlayBook Tutor II Questions

PlayBook Tutorial II Questions

1. Who is the highest paid employee in the marketing dept? How much does that person make?

2. What are the departments on the 2nd floor, by name, that have sold more than 5 different items? List the number of items sold by each department.

3. Write two queries to create two new tables QEmp1 and QEmp2 from a source table QEmp. Fill each with all the data in QEmp.

4. Use the new tables to determine:a) who is Sophie’s Boss?

b) who is the Boss of Paul’s Boss?

5. Determine for each department on the 5th floor the average salary of the department employees with salaries greater than $35,000.

6. Determine who has the lowest salary on the 2nd floor and how much that person makes.

7. Set Mark’s salary to $55,000.

8. Equal JOIN of Customers and Salespeople

9. INNER JOIN of Customers and Salespeople (same result as 8)

10. Find the names of items sold on floors other than the 2nd floor. Find those only sold on floors other than the 2nd floor.

11. Count the number of direct employees of each manager.

12. Among all departments with average salary greater than $13000, list the departments that sell compass(es).

13. List each item delivered to at least 2 departments by the supplier who delivers it.

14. List items supplied by Nepalese Corp. and sold in the Navigation department.

15. Find for each department that has sold items of type E, the average salary of the employees.

16. What is the average delivery quantity of items of type N delivered by each company that delivers them?

17. Find the compass suppliers who delivered less than 10 compasses.

18. List the names and salaries of managers with more than 2 employees.

19. Compute the average salary for employees working for Alice

Page 2: PlayBook Tutor II Questions

20. Which items are sole sourced to one supplier? (That supplier is the only one that supplied the item.)

21. Identify suppliers delivering items of type N to 2nd floor.

22. Identify the items sold by more than one department on the 2nd floor.

23. Determine the number of unique items sold by each supplier.

24. Identify the names of suppliers who supply more than 9 items and return the number of items supplied.

25. Determine the supplier names who do not deliver Compasses.

26. What is the name and salary of the person with the highest salary on the 5th floor?