Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started