Question 1 of 72
Single answerYour retail company wants to predict customer churn using historical purchase data stored in BigQuery. The dataset includes customer demographics, purchase history, and a label indicating whether the customer churned or not. You want to build a machine learning model to identify customers at risk of churning. You need to create and train a logistic regression model for predicting customer churn, using the customer_data table with the churned column as the target label. Which BigQuery ML query should you use?
A. CREATE OR REPLACE MODEL churn_prediction_model OPTIONS(model_type='logistic_reg') AS SELECT * FROM customer_data;
B. CREATE OR REPLACE MODEL churn_prediction_model OPTIONS(model_type='logistic_reg') AS SELECT * EXCEPT (churned), churned AS label FROM customer_data;
C. CREATE OR REPLACE MODEL churn_prediction_model OPTIONS(model_type='logistic_reg') AS SELECT * EXCEPT (churned) FROM customer_data;
D. CREATE OR REPLACE MODEL churn_prediction_model OPTIONS(model_type='logistic_reg') AS SELECT churned as label FROM customer_data;
<p>B. CREATE OR REPLACE MODEL churn_prediction_model OPTIONS(model_type='logistic_reg') AS SELECT * EXCEPT (churned), churned AS label FROM customer_data;</p>
The correct answer is highlighted above. Review the wording carefully, then use the next question to continue building your understanding of Google certification topics.