Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

=+4 Develop and deliver the CCT program.

Answered: 1 week ago

Question

=+5 Evaluate whether the CCT program was effective.

Answered: 1 week ago