Google Associate Cloud Engineer exam dumps

Google Associate Cloud Engineer practice question 240 of 375

Associate Cloud Engineer. Free level, Google Cloud. Free question with the correct answer and a full explanation.

Google Associate Cloud Engineer Question 240

Single answerGoogle Cloud Platform

You are working as a Google Cloud Engineer for a company that stores customer data in a Google Cloud SQL instance using MySQL. The company wants to retrieve specific customer details based on their email address for a marketing campaign. Which of the following queries will correctly retrieve the 'first_name' and 'last_name' from the 'customers' table where the 'email' matches a given email address?

  1. A

    SELECT first_name, last_name FROM customers WHERE email = 'customer@example.com';

  2. B

    SELECT first_name, last_name FROM customers WHERE 'email' = 'customer@example.com';

  3. C

    SELECT first_name, last_name FROM customers WHERE email IS 'customer@example.com';

  4. D

    SELECT first_name, last_name WHERE email = 'customer@example.com' FROM customers;

Show answer and explanation

Correct answer: A

Explanation

Option 1 is the correct SQL query that retrieves the 'first_name' and 'last_name' from the 'customers' table where the email matches 'customer@example.com'. It correctly uses the WHERE clause to filter records and the appropriate syntax for column selection.

  • A. Correct.

    This is the correct SQL syntax for selecting specific columns from a table with a WHERE clause filtering by the 'email' field.

  • B. Incorrect.

    In SQL, the column names should not be enclosed in single quotes. Single quotes are used for string literals.

  • C. Incorrect.

    The 'IS' keyword is not used for comparing string values in SQL. The '=' operator should be used instead.

  • D. Incorrect.

    The SQL syntax is incorrect here as the FROM clause must precede the WHERE clause.

Timed practice exam

Take a Google Associate Cloud Engineer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam