Question: Write an SQL query to add 3 records into the table EMP. E_ID E_Name D_ID 222 Ahmed D10 333 D20 444 D30 Isra Zayid Mohamed

Write an SQL query to add 3 records into the table EMP. E_ID E_Name D_ID 222 Ahmed D10 333 D20 444 D30 Isra Zayid Mohamed Alkyumi Table : PURCHASE ORDER ORDER_NO AMOUNT ORDER DATE CUSTOMER ID SALESMAN ID DELIVERY DATE 1001 30) 2001 3001 10/12 20.20 3003 05-03-2017 10-07-2017 12-06-2017 10-05-2017 US 10-10-2017 12-08-2017 1063 6CX0 3002 1064 400.25 500.10 2002 2005 2003 2004 3064 10-07-2017 1005 03-05-2017 03-08-2017 10-07-2017 1006 400 3005 3006 2005 10-10-2017 PRICE Table: PURCHASE DETAILS ORDER NO PRODUCT NAME 1001 KEYBOARD 1002 MONITOR QUANTITY 100 56 36 200 1003 MOUSE 6 100 1004 58 300 HARD DISK RAM 1005 25 500 1007 CABINET 5 100 a) Write a SQL query to display PRODUCT_NAME, ORDER_DATE and find number of years between the DELIVERY DATE from the CURRENT DATE. (Hint: Use ON Clause). b) Write a SQL query to display matched records from PURCHASE ORDER table and all records from PURCHASE DETAILS
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
