Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An eCommerce website tracks their customers' web activity in a SQL table called Web_sessions. A customer is tracked by a unique cookie on their browser

image text in transcribed

An eCommerce website tracks their customers' web activity in a SQL table called Web_sessions. A customer is tracked by a unique cookie on their browser and is stable over time. Some sample data is shown below: Web_sessions customer_id | date 2018-01-01 2018-01-02 2018-01-03 2018-01-03 start_time 2018-01-01 12:34:10 2018-01-02 14:22:05 2018-01-03 09:00:42 2018-01-03 09:00:43 duration_seconds 125 0 1 10 has_conversion TRUE NULL FALSE TRUE Please answer the following questions: a. What should be the primary key in this table? b. Write a single SQL query to pull all of the following data: for each day, get the number of sessions, conversions, and new customers. (New customers = customers where this is their first time ever going to the website.) Please also indicate which variant of SQL (MySQL, PostgreSQL, etc) you have used. C. Your results will be presented to management. Please comment on the quality of data (based on the sample data above) and any potential sources of error/inaccuracies

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. Divide the class into teams of three to four students.

Answered: 1 week ago

Question

What is the preferred personality?

Answered: 1 week ago