Which two queries give the required result?

View the Exhibits and examine the structures of the products, sales, and customers tables.

You need to generate a report that gives details of the customer’s last name, name of the
product, and the quantity sold for a customers in ‘Tokyo’.
Which two queries give the required result?

View the Exhibits and examine the structures of the products, sales, and customers tables.

You need to generate a report that gives details of the customer’s last name, name of the
product, and the quantity sold for a customers in ‘Tokyo’.
Which two queries give the required result?

A.
Option A

B.
Option B

C.
Option C

D.
Option D



Leave a Reply 5

Your email address will not be published. Required fields are marked *


karan

karan

D is wrong because of ORA-25154: column part of USING clause cannot have qualifier

Meaning you cannot use c.cust_id in the SELECT clause instead it should just be cust_id without the qualifier ā€œcā€.

Surersh

Surersh

A & C gives required result.

oualid

oualid

C is the correct answer.

A, D and B are wrong.

A and D are wrong because aliases can’t be used with JOIN USING join.
B is wrong because of the join syntax

Anand

Anand

A. is correct because using field there aren’t in SELECT
B. syntax is incorrect
C. is correct like A
D. wrong because aliases are in SELECT

The Tuk

The Tuk

select c.cust_id,c.cust_last_name,p.prod_id,p.prod_name,s.quantity_sold
from products p join sales s
using(prod_id)
join customers c
using(cust_id)
where c.cust_city = ‘Tokyo’ ;

ORA-25154: column part of USING clause cannot have qualifier
25154. 00000 – “column part of USING clause cannot have qualifier”
*Cause: Columns that are used for a named-join (either a NATURAL join
or a join with a USING clause) cannot have an explicit qualifier.
*Action: Remove the qualifier.
Error at Line: 1 Column: 35