AWS Certified Data Engineer – Associate (DEA-C01) — Question 139

A data engineer needs to create an Amazon Athena table based on a subset of data from an existing Athena table named cities_world. The cities_world table contains cities that are located around the world. The data engineer must create a new table named cities_us to contain only the cities from cities_world that are located in the US.

Which SQL statement should the data engineer use to meet this requirement?

Answer options

Correct answer: A

Explanation

Option A is correct because it properly uses the INSERT INTO statement to add the selected cities from the cities_world table into the cities_us table based on the specified condition. Option B is incorrect as there is no MOVE command in SQL for this operation. Option C is also valid but does not specify the columns, which is necessary for the INSERT statement. Option D is incorrect since the UPDATE statement is not suitable for populating a new table from another table.