1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 83


Examine the data in the ORDERS table:

Examine the data in the INVOICES table:

Examine this query:

Show Answer
Correct Answer: ABEF

To determine the correct answers, we need to understand how the INTERSECT operator works. The INTERSECT operator returns only the rows that are present in both SELECT statements. Therefore, we need to find common `order_id` and `order_date` pairs in both the ORDERS and INVOICES tables. On examining the two tables, we see that there is only one matching pair: (4, 01-FEB-2019) in both tables. The pair (1, null) is not considered a match because the INTERSECT operator does not consider null values as a match in SQL. So, the correct pair is (4, 01-FEB-2019). Hence, the answers are B and F.

Discussion

17 comments
Sign in to comment
abdullah_barhamOptions: BF
Dec 13, 2022

drop table orders; create table orders(order_id number , order_date date); insert into orders values(1,null); insert into orders values(2,null); insert into orders values(3,'1-jan-2019'); insert into orders values(4,'1-feb-2019'); insert into orders values(5,'1-mar-2019'); create table invoices( invoice_id number, order_id number, order_date date); insert into invoices values(1,1,null); insert into invoices values(2,2,'01-jan-2019'); insert into invoices values(3,3,null); insert into invoices values(4,4,'01-feb-2019'); insert into invoices values(5,5,'01-APR-2019'); SELECT ORDER_ID , ORDER_DATE FROM ORDERS INTERSECT SELECT ORDER_ID , ORDER_DATE FROM INVOICES; ANSWER IS B,F.

Mcromeo
Dec 6, 2023

Based on your own example, it return 2 rows. so B is not correct

Rik92
Feb 20, 2023

This needs an update badly. There is no question, just some tables and a query showing on this site..

SantiBZ_07032022_1744
Feb 12, 2023

Tesded: 1 null 4 01/02/19 00:00:00

Viviana3184
Dec 27, 2022

bf only if F is 01-FEB-2019 and not 01-FEB-2015

cadcadley
Jan 12, 2023

bf only if F is 01-FEB-2019 and not 01-FEB-2015 i am sorry then is B only

cadcadley
Jan 10, 2023

is t 100% bf went we do created everything

jfc1
Jan 17, 2023

BF is the answer

Ricx24Options: BEF
Feb 22, 2023

I already took the exam ant these question ask for 3 answers B, E, F

Shakhzod1999
Feb 23, 2023

can you write to me on telegram @Melsson

kuffOptions: BF
May 3, 2023

BF is the answer

NelitaOptions: BF
Jun 1, 2023

BF ARE CORRECT

zouve
Jun 22, 2023

In Oracle, the INTERSECT operator is used to combine the result sets of two or more SELECT statements and returns only the rows that are common to all result sets.

AishMani20
Jun 27, 2023

Question is not there

SangiiiOptions: BF
Aug 27, 2023

B and F is answer- below is the result we will get. F option has typo 01-FEB-2019 orderid order_date 1 (null) 4 01-02-19

metallersOptions: BF
Oct 23, 2023

La respuesta es la B y la F

uselessscript
Nov 9, 2023

Just finished this exam. Question: Which three results will be returned?

Fargo01Option: B
Mar 26, 2024

Best answer is B. 01-FEB-2019

ArslanAltafOption: B
Jun 7, 2024

I think the question is what the result of intersect The result will only include rows where both the order_id and order_date match between the ORDERS and INVOICES tables. So, order ID 1& 4 has exact match -------- but the 4 1-Fab-2019 is not in result (if you dont consider the Typo in option F) B seems to be the answer in given circumstances