VERIFIED PRACTICE QUESTIONS & SQL / DATA
VISUALIZATION GUIDE | GOOGLE
1. Which of the following best describes the primary role of a data analyst?
A. Build and maintain production machine learning models
B. Design user interfaces for data-entry applications
C. Collect, clean, analyze data, and communicate insights to support decision-
making
D. Administer databases and manage hardware infrastructure
CORRECT ANSWER: C
RATIONALE: Data analysts focus on preparing and analyzing data and communicating findings;
building production ML models and infrastructure administration are typically responsibilities
for data scientists or engineers.
2. In a tidy dataset, how should observations and variables be organized?
A. Variables are rows and observations are columns
B. Each row is an observation and each column is a variable
C. All values in a column must have different data types
D. Observations should be stored across multiple tables only
CORRECT ANSWER: B
RATIONALE: The tidy data principle states that each row represents an observation and each
column represents a variable, which simplifies analysis and tooling.
3. Which SQL clause is used to remove duplicate rows from the result set?
A. WHERE
B. GROUP BY
C. DISTINCT
D. HAVING
CORRECT ANSWER: C
RATIONALE: DISTINCT removes duplicate rows in the SELECT result; GROUP BY
aggregates rows but isn’t used solely to remove duplicates.
4. Given a table orders(order_id, customer_id, order_date, amount), which SQL query
returns the total amount per customer rounded to two decimals?
A. SELECT customer_id, SUM(amount) FROM orders GROUP BY customer_id;
B. SELECT customer_id, ROUND(SUM(amount), 2) FROM orders;
C. SELECT customer_id, ROUND(SUM(amount), 2) AS total_amount FROM
orders GROUP BY customer_id;
D. SELECT DISTINCT customer_id, SUM(amount) FROM orders;
,CORRECT ANSWER: C
RATIONALE: You must group by customer_id to aggregate and use ROUND on SUM(amount);
option B omits GROUP BY causing error in standard SQL.
5. Which chart is most appropriate to show the distribution of a single numeric
variable (e.g., sale amounts)?
A. Line chart
B. Scatter plot
C. Histogram
D. Pie chart
CORRECT ANSWER: C
RATIONALE: Histograms visualize the frequency distribution of a single continuous numeric
variable by binning values.
6. You want to compare sales trends over time for three product categories. Which
visualization is best?
A. Single cumulative histogram
B. Multi-line chart with time on the x-axis and sales on the y-axis, one line per
category
C. Pie chart for each month
D. Scatter plot with product category as color
CORRECT ANSWER: B
RATIONALE: Multi-line charts clearly show trends over time and allow comparison across
categories.
7. In SQL, which JOIN returns only rows that have matching values in both tables?
A. LEFT JOIN
B. RIGHT JOIN
C. FULL OUTER JOIN
D. INNER JOIN
CORRECT ANSWER: D
RATIONALE: INNER JOIN returns only rows where the join condition matches in both tables;
LEFT/RIGHT include non-matching rows from one side.
8. Which of the following is a good practice when cleaning data?
A. Delete all rows with any missing value without analysis
B. Replace all numeric outliers with zero by default
C. Assess missingness and decide whether to impute, exclude, or flag based on
context
D. Change data types arbitrarily to speed up queries
,CORRECT ANSWER: C
RATIONALE: Handling missing data should be context-driven; blind deletion or arbitrary
replacements can introduce bias.
9. Which metric is most appropriate to evaluate a model that predicts a continuous
numeric value (e.g., house price)?
A. Accuracy
B. Precision
C. Root Mean Squared Error (RMSE)
D. F1 score
CORRECT ANSWER: C
RATIONALE: RMSE measures average prediction error for continuous outcomes; accuracy,
precision, and F1 are for classification tasks.
10. Consider two variables: advertising_spend and sales. You compute a correlation
coefficient of 0.85. Which statement is correct?
A. Advertising spend causes sales to increase
B. There is no relationship between advertising spend and sales
C. There is a strong positive linear association between the two, but causation is not
established
D. The variables are independent
CORRECT ANSWER: C
RATIONALE: Correlation measures association, not causation; external factors or reverse
causality could explain the relationship.
11. Which SQL statement will create a new table named recent_orders that contains
only orders from the last 30 days (assume order_date is DATE type)?
A. CREATE TABLE recent_orders AS SELECT * FROM orders WHERE order_date >
NOW() - INTERVAL '30 days';
B. CREATE TABLE recent_orders AS SELECT * FROM orders WHERE
order_date >= CURRENT_DATE - INTERVAL '30 days';
C. CREATE TABLE recent_orders SELECT * FROM orders;
D. CREATE TABLE recent_orders AS SELECT * FROM orders WHERE order_date =
CURRENT_DATE;
CORRECT ANSWER: B
RATIONALE: Option B uses CURRENT_DATE and an interval to filter the last 30 days; option
A uses NOW() which may be fine in some SQL dialects but CURRENT_DATE is standard for
DATE comparison.
, 12. When building a dashboard for stakeholders, which guideline is most important?
A. Include as many charts as possible to show thoroughness
B. Use complex color schemes and many fonts for emphasis
C. Prioritize clarity: show key metrics, keep visuals simple, and tailor to
stakeholders’ needs
D. Always use 3D charts because they look modern
CORRECT ANSWER: C
RATIONALE: Dashboards should emphasize clarity and actionable insights; excessive visuals or
ornamentation reduce usability.
13. Which of the following is the best description of a primary key in a relational
database?
A. A column used only for sorting rows
B. A column that can contain duplicate values
C. A column (or set of columns) that uniquely identifies each row and does not
contain NULLs
D. A column that stores large binary objects
CORRECT ANSWER: C
RATIONALE: A primary key uniquely identifies rows and must be unique and non-NULL.
14. Which SQL function returns the number of rows in a result set?
A. SUM()
B. AVG()
C. COUNT()
D. MIN()
CORRECT ANSWER: C
RATIONALE: COUNT() returns the number of rows (or non-NULL values for a column).
15. You have a dataset with columns: user_id, event_timestamp (UTC), and event_type.
You need to create a new column local_date in timezone 'America/Los_Angeles'.
Which SQL approach is appropriate?
A. SELECT user_id, CAST(event_timestamp AS DATE) AS local_date FROM events;
B. SELECT user_id, (event_timestamp AT TIME ZONE 'UTC' AT TIME ZONE
'America/Los_Angeles')::date AS local_date FROM events;
C. SELECT user_id, DATE_TRUNC('day', event_timestamp) AS local_date FROM
events;
D. SELECT user_id, TO_CHAR(event_timestamp, 'YYYY-MM-DD') AS local_date
FROM events;