Exam Databricks-Certified-Professional-Data-Engineer Topic 5 Question 24 Discussion
Actual exam question for Databricks's Databricks-Certified-Professional-Data-Engineer exam
Question #: 24
Topic #: 5
Question #: 24
Topic #: 5
You are working on a table called orders which contains data for 2021 and you have the second table called orders_archive which contains data for 2020, you need to combine the data from two tables and there could be a possibility of the same rows between both the tables, you are looking to combine the results from both the tables and eliminate the duplicate rows, which of the following SQL statements helps you accomplish this?
Suggested Answer: A Vote an answer
Explanation
Answer is SELECT * FROM orders UNION SELECT * FROM orders_archive
UNION and UNION ALL are set operators,
UNION combines the output from both queries but also eliminates the duplicates.
UNION ALL combines the output from both queries.
Answer is SELECT * FROM orders UNION SELECT * FROM orders_archive
UNION and UNION ALL are set operators,
UNION combines the output from both queries but also eliminates the duplicates.
UNION ALL combines the output from both queries.
by Alvin at Dec 26, 2024, 07:12 AM
0
0
0
10
Comments
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.
Report Comment
Commenting
You can sign-up / login (it's free).