Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers

All weeks Data Wrangling, Analysis and AB Testing with SQL Coursera quiz answer

Data Wrangling, Analysis and AB Testing with SQL Week 01 Quiz Answer

quiz 01: Are You Connected to Mode Analytics?

Q 1. Follow the directions to connect to mode.

Modify this query in the cloned report so that it counts the number of rows in the table dsv1069.users.

To check you are set-up with the course dataset and Mode Analytics correctly, please type the number of rows in the users table.

Answer:

comment the answer:

Module 1 Quiz

Q 1. Based on the dataset for this course, what does this query count

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers
  • Counts the number of invoices
  • Counts the numbers of users
  • Counts the number of rows in the orders table
  • Counts the number of users who have ordered an item

Q 2. Assume you have no information about the data in the example table.

When I run the query below,  no rows are returned, but there are no error messages. What are possible reasons for this? (Select all that apply.)

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers

Answer:

  • There is no column called id
  • There are no rows with a null id
  • There are no rows in the example_table – it’s empty

Q 3. In the events table, (dsv1069.events) for this class, how many rows exist per event_id?

  • One per parameter_name
  • Exactly one
  • Always more than one

Q 4. When you encounter a new dataset, which of the following can you assume? (Select all that apply.)

Answer:

  • There are duplicate rows
  • The table is empty
  • The table has a primary key
  • The data is out-of-date
  • Test usage is unfiltered

Q 5. TROUBLESHOOT THIS ERROR:

Based on your exploration of the tables in the course dataset. Why are the results to this specific query empty?

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers
  • The users table is empty
  • There are no events with this event_name
  • There are no parent_user_ids that satisfy the WHERE clause

Q 6. TROUBLESHOOT THIS ERROR:

Why are the results for this specific query empty?

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers
  • No items have ever been viewed
  • The table is empty
  • There are no events with this event_name

Q 7. What does this query do? Select all true statements.

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers

Answer:

  • The query counts the number of events.
  • The query counts the number of view_item events.
  • The query counts the number of rows corresponding to view_item events.

Q 8. Consider the following query:

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers

What happens when some rows have a NULL value in the column table_alpha.key?

  • Those values aren’t included in the result.
  • Each row with a null value is joined to every row in table_beta where table_beta.column is null.
  • It is not possible for a join key to be null, the query will return an error.
  • Each row with a null value will be joined to every row in table_beta.

Q 9. Which of the following are problems with the query below?

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers
  • We need a GROUP BY clause
  • Count(*) counts rows not unique users
  • The join should be on users.user_id
  • The join should be on users.parent_user_id
  • We are missing a comma
  • There are no error messages, so it must be right

Q 10. In the users table, the column parent_user_id is __________________.

  • Never NULL
  • Always NULL
  • Sometimes NULL

Data Wrangling, Analysis and AB Testing with SQL Week 02 Quiz Answer

Quiz 01: Data Types

Q 1. Which of the following is easier to read?

Answer:

SELECT
 column_1,
 column_2,
 count(*)
FROM
 example_table
WHERE
column_3 is not null
GROUP BY
 column_1,
 column_2

Q 2. Suppose in a table you find a column called username, which contains the value kat123. What is the correct data type category for this column?

username
kat123
  • Number
  • String
  • Date

Q 3. Suppose in a table you find a column called price, which contains the value $9.99. What is the best data type category for this column?

price
9.99
  • String
  • Date
  • Number

Q 4. Suppose in a table you find a column called created_at, which contains the value 2019-01-01. What is the best data type category for this column?

created_at
2019-01-01
  • String
  • Number
  • Date

Q 5. Suppose in a table you find a column called price, which contains the value $9.99. Of the following options, which is the best data type for this column?

price
9.99
  • FLOAT
  • BIGINT
  • INT

Quiz 02 : Dependencies

Q 1. ETL stands for:

  • Extraction Transaction Load
  • Extract Transaction Language
  • Extract Transform Language
  • Extraction Transform Load
  • Extract Transform Load

Q 2. If I say that table X is dependent on table Y which table should be generated (or refreshed) first?

  • Table X
  • Table Y

Q 3.Based on the material covered in this lesson What is a Dependency? which of the following statements is true?

  • The events table depends on the view_items table
  • The users table depends on the events table
  • The view_items table depends on the events table
  • The view_items table depends on the items table

Q 4. Based on the code snippet below, which statements are definitely true:

CREATE TABLE table_x AS

SELECT

 date,

 COUNT(*)

FROM

 table_y

GROUP BY

 date

  • Table_y is dependent on table_x
  • Table_y has no dependenies
  • Table_x is dependent on table_y

Quiz 03: Turn a Clean Query Into a Table

Q 1. Which of the following table methods allows you to specify data types?

Answer:

CREATE TABLE    
 example_table
( column_name ….)   

Quiz 04 : Module 2 Quiz

Q 1. Which step should happen first in data analysis?

  • Cleaning and Labeling Data
  • Machine Learning
  • Collecting Data

Q 2. TROUBLESHOOT THIS ERROR by selecting appropriate actions to remedy this specific query:

Kat ran 9 lines of MySQL (finished in 112ms):

  1. ————–
  2. CREATE TABLE
  3. example_table
  4. (
  5. column1  DATE,
  6. column2  VARCHAR(30),
  7. column3  INT
  8. )
  9. ————–

ERROR 1050 (42S01) at line 1: Table ‘example_table’ already exists

Bye

mysql>

  • There is no error here
  • Run DESCRIBE TABLE example_table to see if the existing example_table is structured appropriately
  • Check that the data type for column2 should actually be VARCHAR(30)
  • Check the syntax, near line 6

Q 3. Based on the code snippet below, which statements are definitely true (select all that apply):

  1. CREATE TABLE table_x AS
  2. SELECT
  3.  dates_rollup.date,
  4.  COUNT(*)
  5. FROM
  6.  Dates_rollup
  7. JOIN
  8.  Table_y
  9. ON
  10. dates_rollup.date = table_y.date
  11. GROUP BY
  12.  date

Answer:

  • table_x is dependent on table_y
  • table_y has no dependencies
  • table_x is dependent on table_y and dates_rollup
  • table_y is dependent on table_x

Q 4. Based on what you know about the orders table for this class, which of the following columns have a suitable datatype?

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers

*Please note, due to the limitations of the free version of Mode Analytics, you are not able to replicate this data without an Enterprise account.

Answer:

  • Paid_at
  • Invoice_id
  • user_id
  • item_name
  • Created_at

Q 5. For this class, we are using Mode on a dataset specifically created for this course. Which of these circumstances could be different in a real world situation? (Select all that apply.)

Answer:

  • The specific dialect of SQL
  • The categories of data types (Number, Date, String)
  • How frequently the data is updated

Q 6. Based on what you know about the items table for this class, which of the following columns have a suitable datatype? (Select all that apply.)

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers

**Please note, due to the limitations of the free version of Mode Analytics, you are not able to replicate this data without an Enterprise account.

Answer:

  • created_at
  • name
  • category

Q 7. Which of the following table methods allows you to specify data types?

Answer:

  1. CREATE TABLE    
  2.  example_table
  3. (column_name1 ….)

Q 8. When creating a user info table we used a variable in place of which column?

  • The user
  • The order id
  • The date

Q 9. Suppose in a table, you find a column called email which contains the value [email protected]. What is the correct data type category for this column?

email
[email protected]
  • String
  • Number
  • Date

Q 10. In this module, we created a table specifically of item view events. What level of the hierarchy of data does this belong on?

  • Learn and Optimize
  • Explore and Transform
  • Collecting Data

Q 11. uppose in a table you find a column called event_id, which contains the value z87df6ab4waoa756b3. What is the correct data type category for this column?

event_id
z87df6ab4waoa756b3
  • Date
  • String
  • Number

Data Wrangling, Analysis and AB Testing with SQL Week 03 Quiz Answer

Quiz 01: Reorder and Connect Tables

Q 1. Let’s suppose we want to write a query to answer both of these questions:

  • How many items have been purchased?
  • How many items do we have?

Please choose the best set of columns for a final query that would answer these questions:

Answer:

Item_count
Items_ever_purchased_count

Q 2. Please select all tables that will be necessary answer both of these questions:

  • How many items have been purchased?
  • How many items do we have?

Answer:

  • Orders
  • Items

Q 3. We’ve decided to only use the items and orders tables to answer the following questions:

  • How many items have been purchased?
  • How many items do we have?

Can we compute the columns Items_count, items_ever_purchased_count without a subquery?

Answer:

Yes

Q 4. We’ve decided to answer the following questions:

  • How many items have been purchased?
  • How many items do we have?

Which of the following queries will answer both those questions without further computation?

Answer:

SELECT 

  COUNT(DISTINCT items.id)       

AS items_count,

  COUNT(DISTINCT orders.item_id) 

AS items_ever_purchased_count

FROM  

  dsv1069.items

LEFT OUTER JOIN

  dsv1069.orders

ON 

  items.id = orders.item

Q 5. In the previous question we decided that the query below could answer the questions :

  • How many items have been purchased?
  • How many items do we have?

————————————–

SELECT

 COUNT(DISTINCT items.id)       AS items_count,

 COUNT(DISTINCT orders.item_id) AS items_ever_purchased_count

FROM  

 dsv1069.items

LEFT OUTER JOIN

 dsv1069.orders

ON

 items.id = orders.item

————————————–

Is this the only possible way to answer the question? Justify your answer.

Answer:

Comment the answer:

Quiz 02: Module 3 Quiz

Q 1. Which of the following attributes distinguish a work-in-progress from a “polished” final query? (Select all that apply.)

Answer:

  • Every column is listed in a GROUP BY clause
  • The query is formatted consistently, or according to a style guide
  • Every join is an inner join

Q 2. In which of the following sections did we perform analysis to directly guide decision making?

  • Creating a view items table
  • Answering a question about reordering items
  • Pulling email addresses and item_ids for a promo email

Q 3. Which of the following are uses of a dates rollup table?

Answer:

  • For keeping track of your meeting schedule
  • Creating dashboards with a complete set of dates
  • Efficiently computing aggregates over a rolling time period

Q 4. We’ve decided to only use the items and users tables to answer the following questions:

  • How many items have been purchased?
  • How many items do we have?

Which join type and order will allow us to correctly compute the columns Item_count, items_ever_purchased_count?

Answer:

comment the answer:

Q 5.For this statement, fill in the __ with the appropriate inequality (<, <=, =, >=, >):

In any subset of the orders table:

Number of line items __ Number of distinct items ordered

  • >
  • <=
  • >=
  • <
  • =

Q 6. Select the best definition of a windowing function?

  • It allows you to make your own windows of data.
  • It is a function that computes a value on a certain partition, or window, of the data that is specified in the PARTITION BY statement.
  • It allows you to compute aggregations with a rolling date period.

Q 7. Folks at the company wonder if our product catalog is too small. What are some related questions that you could directly answer with our dataset? (Select all that apply.)

  • How many items do we have?
  • What work would need to be done to remove products from the catalog?
  • How many items have been viewed?
  • How many users have purchased an item?
  • How many items have been purchased?
  • How many products do our competitors carry?
  • How many items have been viewed but not ordered?

Q 8 Which of the following tasks can be accomplished with a windowing function? (Select all that apply.)

  • Find the email address of each user
  • Find the price of each item
  • Find the most expensive item per order
  • Find the most recently viewed item

Q 9.Let’s suppose we want to write a query to answer both of these questions:

  • How many users have made a purchase?
  • How many users do we have?

Please choose the best set of columns for a final query that would answer these questions:

Answer:

comment the Answer

Q 10. According to the methodology suggested in this module, which step comes last?

  • Present the data in the appropriate context
  • Understand the decisions that are at stake
  • Format your query according to the style guide

Data Wrangling, Analysis and AB Testing with SQL Week 04 Quiz Answer

Prepared for the Final Project?

Q 1. Which of the following are the purpose of AB testing? (Select all that apply).

  • Learn from data
  • Clean and label data
  • Provide evidence for or disprove a hypothesis

Q 2. Which of the following are necessary components of a user-level test assignment table? (Select all that apply).

  • The user’s email address
  • The assignment (treatment or control?)
  • The date or time of assignment
  • A test name or number
  • The user_id

Q 3. Which of the following are necessary components of an item-level test assignment table? (Select all that apply)

  • A test name or number
  • The user_id
  • The date or time of assignment
  • The item category
  • The assignment (treatment or control?)
  • The item id

Q 4.In the final project we’ll be doing AB testing at an item level. Check out the table final_assignment_qa. What other pieces of data will you need to compute the 30-day order binary. (Select all that apply).

Please note: 30-day order binary means show a 1 if the item was ordered at any point the 30 day period after treatment, and 0 if the item was never ordered.

  • The orders table
  • I’m still missing something
  • The user_id
  • The users table
  • The item category

Q 5. Use this AB testing calculator. Enter the numbers seen in the image, and use the results to determine if the results are statistically significant

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers

Are the results statistically significant?

Answer:

Yes

Q 6. Use this AB testing calculator. Enter the numbers seen in the image, and select all the correct interpretations of the data.

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers
  • We have not collected enough samples to be able to detect statistically significant lift of 1%
  • There is no detectable change in this metric
  • The treatment caused a lift of as much as 27% in the success metric
  • The treatment caused a 1% lift in the success metric

Q 7.Use this AB testing calculator. Enter the numbers seen in the image. In this calculation, what is the observed success rate in control?

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers
  • 14%
  • 7.5% to 9.6%
  • 61%
  • 12% to 15%
  • 8.5%
  • 40% to 81%

Q 8. Use this AB testing calculator. Enter the numbers seen in the image. In this calculation, what is the observed success rate in treatment?

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers
  • 7.5% to 9.6%
  • 12% to 15%
  • 8.5%
  • 61%
  • 14%
  • 40% to 81%

Q 9. Use this AB testing calculator. Enter the numbers seen in the image. In this calculation, what is the observed relative lift in success rate between control and treatment?

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers
  • 61%
  • 7.5% to 9.6%
  • 14%
  • 12% to 15%
  • 8.5%
  • 40% to 81%

Q 10. Use this AB testing calculator. Enter the numbers seen in the image. In this calculation, what is the range of improvement that is likely to have been caused by the treatment?

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers
  • 40% to 81%
  • 12% to 15%
  • 14%
  • 61%
  • 8.5%
  • 7.5% to 9.6%

Q 11. Which of the following queries would meet the coding standards for the final project?

Answer:


SELECT 

COUNT(*) AS user_count

FROM dsv1069.users
Get All Course Quiz Answers of Learn SQL Basics for Data Science Specialization

SQL for Data Science Coursera Quiz Answers

Data Wrangling, Analysis and AB Testing with SQL Coursera Quiz Answers

Distributed Computing with Spark SQL Coursera Quiz Answers

Team Networking Funda
Team Networking Funda

We are Team Networking Funda, a group of passionate authors and networking enthusiasts committed to sharing our expertise and experiences in networking and team building. With backgrounds in Data Science, Information Technology, Health, and Business Marketing, we bring diverse perspectives and insights to help you navigate the challenges and opportunities of professional networking and teamwork.

Leave a Reply

Your email address will not be published. Required fields are marked *