QuestionQ70

VerifiedData Processing & Transformations

A data engineering team has two tables. The first table march_transactions is a collection of all retail transactions in the month of March. The second table april_transactions is a collection of all retail transactions in the month of April. There are no duplicate records between the tables.

Which of the following commands should be run to create a new table all_transactions that contains all records from march_transactions and april_transactions without duplicate records?

Explanation

The UNION operator combines results from two SELECT statements and automatically removes duplicate rows. Since the scenario specifies there are no duplicate records between march_transactions and april_transactions, UNION efficiently creates a unified table. JOIN operations would create Cartesian products or match conditions between the tables, which is not the intended operation here.

Community Discussion

No comments yet. Be the first to start the discussion!