MCQs on BigQuery for Data Analysis | Google BigQuery

BigQuery is Google’s powerful cloud-based data warehouse that simplifies large-scale data analysis. With advanced features like analytical functions, window functions, and statistical tools, BigQuery enables deep exploratory data analysis (EDA). Learn how to optimize queries, understand query plans and costs, and handle nested data using arrays and structs for efficient analytics.


BigQuery MCQs

Analytical Functions

  1. What does the COUNT function in BigQuery return?
    a) Number of distinct rows
    b) Total number of rows
    c) Number of null values
    d) Average of rows
  2. Which function calculates the sum of a numeric column?
    a) COUNT
    b) AVG
    c) SUM
    d) MEDIAN
  3. What is the purpose of the GROUP BY clause in BigQuery?
    a) Aggregating data into groups
    b) Filtering rows based on conditions
    c) Joining two tables
    d) Sorting the data
  4. Which analytical function is used to find the nth largest value in a dataset?
    a) RANK
    b) NTILE
    c) PERCENTILE_CONT
    d) ROW_NUMBER
  5. Which clause is necessary for using aggregate functions like SUM or COUNT?
    a) HAVING
    b) WHERE
    c) GROUP BY
    d) ORDER BY

Window Functions

  1. What is a window function in BigQuery?
    a) A function used for aggregating data globally
    b) A function that operates over a subset of rows related to the current row
    c) A visualization tool
    d) A function for data filtering
  2. Which keyword defines the boundaries of a window function?
    a) PARTITION BY
    b) OVER
    c) WITHIN
    d) LIMIT
  3. What does the ROW_NUMBER window function do?
    a) Assigns ranks to rows with ties
    b) Assigns a unique number to each row in a partition
    c) Groups rows into buckets
    d) Returns cumulative sums
  4. How does the RANK function differ from ROW_NUMBER?
    a) RANK skips numbers for tied values
    b) ROW_NUMBER groups rows into buckets
    c) RANK uses partitioning, while ROW_NUMBER does not
    d) ROW_NUMBER includes nulls, while RANK excludes them
  5. What does the NTILE function in window operations do?
    a) Splits rows into a specified number of groups
    b) Sorts rows in ascending order
    c) Calculates cumulative sums
    d) Counts rows per partition

Statistical Functions

  1. Which function calculates the standard deviation of a column?
    a) STDDEV
    b) VARIANCE
    c) AVG
    d) MEDIAN
  2. What does the CORR function compute in BigQuery?
    a) Variance
    b) Standard deviation
    c) Correlation between two columns
    d) Median
  3. Which statistical function calculates the percentile of a dataset?
    a) NTILE
    b) PERCENTILE_CONT
    c) STDDEV
    d) VAR_POP
  4. What is the purpose of the VAR_POP function?
    a) Calculate sample variance
    b) Calculate population variance
    c) Calculate mean
    d) Calculate median
  5. Which statistical function is best for analyzing the relationship between numeric columns?
    a) AVG
    b) STDDEV
    c) CORR
    d) SUM

Exploratory Data Analysis (EDA)

  1. What is the main goal of exploratory data analysis?
    a) Building predictive models
    b) Visualizing trends and patterns in data
    c) Cleaning and transforming data
    d) Compressing datasets
  2. Which BigQuery feature is best for examining the distribution of data?
    a) ARRAY functions
    b) Statistical functions
    c) Window functions
    d) Aggregate functions
  3. What function would you use to get a quick summary of data?
    a) EXPLAIN
    b) INFORMATION_SCHEMA
    c) SUMMARY
    d) COUNT
  4. Which clause filters rows during EDA?
    a) GROUP BY
    b) ORDER BY
    c) WHERE
    d) HAVING
  5. What is an example of a categorical variable in EDA?
    a) Employee ID
    b) Annual income
    c) Sales growth percentage
    d) Age in years

Unnesting and Flattening Nested Data

  1. Which function is used to flatten nested data in BigQuery?
    a) UNNEST
    b) FLATTEN
    c) SPLIT
    d) JOIN
  2. Arrays in BigQuery can store:
    a) Only numeric data
    b) Only string data
    c) Multiple values of the same type
    d) Mixed data types
  3. How do you access a specific element in an array?
    a) ARRAY_INDEX
    b) Using the OFFSET function
    c) ACCESS function
    d) SELECT function
  4. What is a struct in BigQuery?
    a) A single value container
    b) A collection of ordered values
    c) A collection of named fields
    d) A dynamic data type
  5. Which clause is required when working with nested data?
    a) GROUP BY
    b) CROSS JOIN
    c) WITH OFFSET
    d) UNNEST

Optimizing Query Performance

  1. What is the main purpose of query optimization in BigQuery?
    a) Enhance query execution speed
    b) Improve data quality
    c) Ensure data privacy
    d) Increase query size
  2. How can you reduce query costs in BigQuery?
    a) Use SELECT * for all queries
    b) Partition tables
    c) Avoid indexes
    d) Increase table size
  3. What does the EXPLAIN statement do in BigQuery?
    a) Visualizes query results
    b) Analyzes query execution plans
    c) Executes the query immediately
    d) Combines datasets
  4. What are BigQuery slots?
    a) Data storage units
    b) Virtual CPUs used for query processing
    c) Memory blocks for caching results
    d) Predefined templates for queries
  5. Which caching method helps improve query performance?
    a) Result caching
    b) Object caching
    c) Disk caching
    d) Data compression

Answers

QnoAnswer
1b) Total number of rows
2c) SUM
3a) Aggregating data into groups
4a) RANK
5c) GROUP BY
6b) A function that operates over a subset of rows related to the current row
7b) OVER
8b) Assigns a unique number to each row in a partition
9a) RANK skips numbers for tied values
10a) Splits rows into a specified number of groups
11a) STDDEV
12c) Correlation between two columns
13b) PERCENTILE_CONT
14b) Calculate population variance
15c) CORR
16b) Visualizing trends and patterns in data
17b) Statistical functions
18d) COUNT
19c) WHERE
20a) Employee ID
21a) UNNEST
22c) Multiple values of the same type
23b) Using the OFFSET function
24c) A collection of named fields
25d) UNNEST
26a) Enhance query execution speed
27b) Partition tables
28b) Analyzes query execution plans
29b) Virtual CPUs used for query processing
30a) Result caching

4o

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top