- What is SQL designed for?
Use this database design to answer the following questions.
- Write down the SQL to show the unique department_id in the employees table. (Hint: 12 records)
- Write down the SQL to show all the employee information for those whose department_id is 60. (Hint: 5 records)
- Write down the SQL to show the first name and last name for those employees satisfying one of the following conditions (1) hire_date is after 01/01/2008 and before 12/31/2008, (2) salary is above 8000. (Hint: 43 records, and I am asking you to write one SQL for this question instead of two.)
- Write down the SQL to show the average salary of employees whose hire_date is after 01/01/2008 and before 12/31/2008. (Hint: 1 record)
- Write down the SQL to show the full name (in one attribute) and hire_date of employees, and sort records according to hire_date in a descending order. (Hint: 107 records)