Previous Topic: Retrieving Data Rrom Tables and RecordsNext Topic: Sample Tables and Database


Testing Your Knowledge

Using the sample tables in Appendix A:, code a SELECT statement for each of the queries listed below. num=B.Answers, contains one possible answer. Remember, there can be more than one way to achieve the same result when you use the SELECT statement.

  1. List the average salary for employees in the Boston office
  2. List all employees in the Springfield office who are programmer/analysts
  3. List the average salary of the managers in table DEPT
  4. List all employees who are either programmer/analysts, paste-up artists, or a brainstorming manager

Using the data structure diagram in code a SELECT statement for these database record queries:

  1. List each employee's job title and salary
  2. For each job assigned to more than one employee, list the number of employees assigned to the job and their average salaries
  3. List each employee's manager