Courseiva
Preparing and Using Data for AnalysismediumMultiple ChoiceObjective-mapped

PDE Preparing and Using Data for Analysis Practice Question

A data engineer needs to train a linear regression model in BigQuery ML using a table with 10 million rows. The model will predict sales based on features like advertising spend, seasonality, and store location. Which SQL statement should they use to create and train the model?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

CREATE MODEL mymodel OPTIONS(model_type='LINEAR_REG') AS SELECT * FROM sales_data

In BigQuery ML, the CREATE MODEL statement with option MODEL_TYPE='LINEAR_REG' creates a linear regression model. The training data is specified in the AS SELECT clause.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • CREATE MODEL mymodel AS SELECT * FROM sales_data WITH LINEAR REGRESSION

    Why it's wrong here

    Incorrect syntax.

  • CREATE MODEL mymodel OPTIONS(model_type='LINEAR_REG') AS SELECT * FROM sales_data

    Why this is correct

    Correct syntax for linear regression in BigQuery ML.

  • CREATE OR REPLACE MODEL mymodel OPTIONS(model_type='LINEAR_REGRESSION') AS SELECT * FROM sales_data

    Why it's wrong here

    Model type should be 'LINEAR_REG' not 'LINEAR_REGRESSION'.

  • CREATE MODEL mymodel OPTIONS(model_type='linear_reg') AS SELECT * FROM sales_data

    Why it's wrong here

    The model_type option should be 'LINEAR_REG', not 'linear_reg'.

About these practice questions

Courseiva writes every PDE question from scratch — 890 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PDE exam.