Topic 1 Question 156
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?
INSERT INTO cities_usa (city,state) SELECT city, state FROM cities_world WHERE country=’usa’;
MOVE city, state FROM cities_world TO cities_usa WHERE country=’usa’;
INSERT INTO cities_usa SELECT city, state FROM cities_world WHERE country=’usa’;
UPDATE cities_usa SET (city, state) = (SELECT city, state FROM cities_world WHERE country=’usa’);
ユーザの投票
コメント(4)
- 正解だと思う選択肢: A
INSERT INTO cities_usa (city,state) SELECT city,state FROM cities_world WHERE country='usa'
👍 4Eleftheriia2024/11/01 Answer:D
👍 1Parandhaman_Margan2024/10/26- 正解だと思う選択肢: A
should be A or C but C will failed if cities_usa contains more than 2 columns so specify the list of column want to insert is the good one.
👍 1truongnguyen862024/10/31
シャッフルモード