exam questions

Exam 1z0-071 All Questions

View all questions & answers for the 1z0-071 exam

Exam 1z0-071 topic 1 question 203 discussion

Actual exam question from Oracle's 1z0-071
Question #: 203
Topic #: 1
[All 1z0-071 Questions]

Examine the description of the ORDERS table:



Examine the description of the INVOICES table:



Which three statements execute successfully? (Choose three.)

  • A. SELECT * FROM orders ORDER BY order_id

    INTERSECT -
    SELECT * FROM invoices ORDER BY invoice_id;
  • B. (SELECT * FROM orders

    UNION ALL -
    SELECT * FROM invoices) ORDER BY order_id;
  • C. SELECT order_id, order_date FROM orders

    UNION ALL -
    SELECT invoice_id, invoice_date FROM invoices ORDER BY order_id;
  • D. SELECT * FROM orders -

    MINUS -
    SELECT * FROM invoices ORDER BY 1;
  • E. SELECT order_id invoice_id, order_date FROM orders

    MINUS -
    SELECT invoice_id, invoice_date FROM invoices ORDER BY invoice_id;
  • F. SELECT * FROM orders ORDER BY order_id

    UNION -
    SELECT * FROM invoices;
  • G. SELECT order_id, order_date FROM orders

    INTERSECT -
    SELECT invoice_id, invoice_date FROM invoices ORDER BY invoice_id;
Show Suggested Answer Hide Answer
Suggested Answer: CDE 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Thameur01
2 months, 3 weeks ago
Selected Answer: BCD
E is incorrect for more than one reason! BCD
upvoted 1 times
...
HUGO2024
7 months, 3 weeks ago
Selected Answer: BCD
answer :CDE
upvoted 1 times
...
lucemqy
1 year, 5 months ago
Selected Answer: CDE
CDE is the correct answer
upvoted 3 times
...
jm9999
1 year, 6 months ago
Selected Answer: BCD
BCDE all work as written. E will fail if you put a comma between order_id and invoice_id
upvoted 1 times
...
fasolazgrochem
1 year, 7 months ago
Selected Answer: CDE
Tested
upvoted 2 times
...
Shrimathi
1 year, 9 months ago
answer :CDE
upvoted 1 times
...
WingL
1 year, 9 months ago
Selected Answer: CDE
CDE CORRECT. PLEASE HAVE A TRY: CREATE TABLE ORDERS_01 ( ORDER_ID NUMBER(38), ORDER_DATE DATE ); CREATE TABLE INVOICES_01 ( INVOICE_ID NUMBER(38), INVOICE_DATE DATE ); SELECT * FROM ORDERS_01 ORDER BY order_id INTERSECT SELECT * FROM INVOICES_01 ORDER BY invoice_id; SELECT * FROM ORDERS_01 UNION ALL SELECT * FROM INVOICES_01 ORDER BY ORDER_ID; SELECT order_id, order_date FROM ORDERS_01 UNION ALL SELECT invoice_id, invoice_date FROM INVOICES_01 ORDER BY order_id; SELECT * FROM ORDERS_01 MINUS SELECT * FROM INVOICES_01 ORDER BY 1; SELECT order_id invoice_id, order_date FROM ORDERS_01 MINUS SELECT invoice_id, invoice_date FROM INVOICES_01 ORDER BY invoice_id; SELECT * FROM ORDERS_01 ORDER BY order_id UNION SELECT * FROM INVOICES_01; SELECT order_id, order_date FROM ORDERS_01 INTERSECT SELECT invoice_id, invoice_date FROM INVOICES_01 ORDER BY invoice_id;
upvoted 2 times
WingL
1 year, 9 months ago
B HAS TWO ERRORS: 1. MUST START TO BEGIN WITH 'SELECT', NOT () BRACKETS 2. CANNOT ORDER BY ORDER_ID ORA-00904: "ORDER_ID": invalid identifier WHY E IS CORRECT: SELECT order_id invoice_id, order_date FROM ORDERS_01 equals SELECT order_id AS invoice_id, order_date FROM ORDERS_01 (a little trap here)
upvoted 2 times
...
...
Orxan_H
1 year, 9 months ago
Selected Answer: BCD
BCD are correct
upvoted 1 times
...
MooonLight
1 year, 12 months ago
I have checked that E is working, but I don't understand why.
upvoted 1 times
Sathitest071
1 year, 11 months ago
Invoice_id is an alias for order_id in the first select. So it can be used in order by clause and it works. E. SELECT order_id invoice_id, order_date FROM orders MINUS - SELECT invoice_id, invoice_date FROM invoices ORDER BY invoice_id; F. SELECT * FROM orders ORDER BY order_id
upvoted 1 times
...
WingL
1 year, 9 months ago
SELECT order_id invoice_id, order_date FROM ORDERS_01 equals SELECT order_id AS invoice_id, order_date FROM ORDERS_01 (a little trap here)
upvoted 1 times
...
...
Darnun
2 years ago
Selected Answer: CDE
CDE are correct. B is wrong as this is subquery without SELECT * in the beginning.
upvoted 1 times
...
Sathitest071
2 years ago
Answer is BCD E is wrong because 1) The first select has 3 columns and second select has only 2 columns which is wrong. 2) The first select selects column invoice_id from the second table which is wrong . 3) Order by invoice_id is wrong.
upvoted 1 times
Izzicertificacion
1 year, 8 months ago
en la E se toma como Alias invoice_id
upvoted 1 times
...
Sathitest071
1 year, 12 months ago
Sorry, CDE are the correct answer.
upvoted 1 times
...
...
SantiBZ_07032022_1744
2 years, 1 month ago
CDE: Pruebas: /*A NOOK*/ SELECT * FROM orders ORDER BY order_id INTERSECT SELECT * FROM invoices ORDER BY invoice_id; /*B NOOK*/ (SELECT * FROM orders UNION ALL SELECT * FROM invoices) ORDER BY order_id; /*C OK*/ SELECT order_id, order_date FROM orders UNION ALL SELECT invoice_id, invoice_date FROM invoices ORDER BY order_id; /*D OK*/ SELECT * FROM orders MINUS SELECT * FROM invoices ORDER BY 1; /*E OK*/ SELECT order_id invoice_id, order_date FROM orders MINUS SELECT invoice_id, invoice_date FROM invoices ORDER BY invoice_id; /*F. NOOK */ SELECT * FROM orders ORDER BY order_id UNION SELECT * FROM invoices; /*G. NOOK*/ SELECT order_id, order_date FROM orders INTERSECT SELECT invoice_id, invoice_date FROM invoices ORDER BY invoice_id;
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago