Question: Q1. Run a SQL query from the employee table to find the age of the employees and the Day(Ex:Monday) they were born. Note:Age is matched


Q1. Run a SQL query from the employee table to find the age of the employees and the Day(Ex:Monday) they were born.
Note:Age is matched with the 2021 year.
Q2. For each EMPLOYEE, retrieve the average hours worked from the Works_on table. List the employee SSN, Name(1st, Middle, Last) and the average hours worked, and sort the list on descending average hours worked
-- if salary for multiple years(more than once in the DB) this query result would be outstanding
Q3. Write and test a query to list the name and the total compensation(salary+commission) of all the instructors.Unknown commission should be treated as zero.
FNAME MINIT LNAME SSN BDATE ADDRESS SEX SALARY SUPERSSN DNO Alicia J Zelaya 999887777 19-JUL-58 3321 Castle, Spring, TX F 25000 987654321 4 Jennifer S Wallace 987654321 20-JUN-31 291 Berry, Bellaire, TX F 43000 888665555 4 Ramesh K Narayan 666884444 15-SEP-52 975 Fire Oak, Humble, TX M 38000 333445555 5 Joyce A English 453453453 31-JUL-62 5631 Rice, Houston, TX F 25000 333445555 5 Ahmad V Jabbar 987987987 29-MAR-59 980 Dallas, Houston, TX M 25000 987654321 4 James E Borg 888665555 10-NOV-27 450 Stone, Houston, TX M 55000 1 New V Lost 777977977 23-MAR-77 NY, NY M 20000 987654321 4 Franklin T Wong 333445555 08-DEC-45 638 Voss, Houston, TX M 40000 888665555 John B Smith 123456789 09-JAN-55 731 Fondren, Houston, TX M 30000 333445555 5 Download CSV 9 rows selected. ESSN PNO HOURS 123456789 1 32.5 123456789 2 7.5 666884444 3 40 453453453 1 20 453453453 2 20 333445555 2 10 333445555 3 10 333445555 10 10 333445555 20 10 999887777 30 30 999887777 10 10 987987987 10 35 987987987 30 5 987654321 30 20 987654321 20 15 888665555 20 Download CSV 16 rows selected
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
