Unlock the power of your data in the cloud! Get hands-on with Google Cloud's core data services like BigQuery and Looker to validate your practical skills in data ingestion, analysis, and management, and earn your Associate Data Practitioner certification!
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
A business analyst is analyzing an e-commerce orders dataset in BigQuery. The retail operations manager asks for a regional performance breakdown to answer two specific business questions:
The dataset orders contains columns order_id, region, and order_amount.
Which GoogleSQL query should the analyst write to segment the dataset and answer both business inquiries?
This SQL query combines standard aggregate functions (SUM and AVG) with a GROUP BY clause in GoogleSQL to compute descriptive statistics categorized across distinct attribute values.
SUM(order_amount) function aggregates the numerical values within order_amount by adding them together for each group, producing the total monetary revenue.AVG(order_amount) function calculates the arithmetic mean of order_amount for each group, determining the average transaction size.GROUP BY region clause partitions the rows into subsets based on unique values in the region column, ensuring both summary metrics are computed independently per region.SUM and AVG run efficiently across distributed data partitions in BigQuery.In standard SQL syntax used by BigQuery, whenever non-aggregated columns such as region appear in the SELECT list alongside aggregation functions like SUM() and AVG(), they must be specified in the GROUP BY clause. This query adheres strictly to standard SQL semantics while utilizing the correct, built-in aggregation functions.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.