Student S.

asked • 11/13/20

Can someone please help I have been struggling figuring the SLQ query on this figure can someone also explain how this works please I Dont want to fail

Please provide how you completed the table I want to learn badly

Write the correct output for each SQL query. Put your answers in a .txt file (separate the columns properly with the use of the TAB key).

Consider the following tables (1-5):

Product Table

P_code P_descript P_indate P_price P_salecode
11QER/31 Power painter, 15 psi., 3-nozzle 2007-11-03 109.99 2
89-WRE-Q Hicut chainsaw, 16 in. 2008-08-02 256.99 1
WR3-TT3 Steel Matting, 4'x8'x1/6”, .5 mesh" 2007-01-17      119.95 1
SH-18277 1.25 in., wd screw, 50 2004-02-28 6.99  

 

Sale table

S_code S_descript
1 Level 1 Sale
2 Level 2 Sale
3 Level 3 Sale

 

Example: SELECT p_code, p_descript, s_descript FROM product,sale

Answer:

Sample Answer

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

1) SELECT p_code, p_descript, s_descript FROM product,sale where s_code = '1'

2) SELECT p_code, s_code FROM product INNER JOIN sale on p_salecode = s_code

3) select * from product left join sale on p_salecode = s_code

4) select * from product join sale on p_salecode = s_code

5) select * from product right join sale on p_salecode = s_code


Elise B.

tutor
Check again. I think it was approved this morning.
Report

11/15/20

2 Answers By Expert Tutors

By:

Elise B.

tutor
Result tables: http://s000.tinyupload.com/index.php?file_id=40153677077173354841
Report

11/14/20

Elise B.

tutor
I pasted the result tables in a file because Wyzant wouldn't accept my answer with the tables inline. The comment with the link to the file is currently under review.
Report

11/14/20

Elise B.

tutor
Additionally, I assumed that JOIN is an outer join. JOIN functionality will depend somewhat on the DBMS, so you may want to double check the interpretation of JOIN used by your DBMS.
Report

11/14/20

Student S.

Sorry but I cant find the link or maybe it isn't uploaded yet
Report

11/15/20

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.