Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Tables: Payment Table: This table contains all the payment records on a date and member level. This is for members who make a payment on

Tables: Payment Table: This table contains all the payment records on a date and member level. This is for members who make a payment on each day. A sample data looks like this: Date memberID Amount 1/3 A $33.9 1/4 C $19.3 1/7 A $29.1

User Table: This table contains all the active records on a date and member level. This is for member who visit linkedin.com site on each day. A sample data looks like this: Date memberID 1/1 A 1/3 A 1/3 B 1/4 A 1/4 C 1/5 B

Date Table: this table contains the date information Date 1/1 1/2 1/3 1/4 1/5 1/6

Questions: Please write a query for the following cases: (1) Total Revenue & Payers: Create a table to display total revenue & number of buyers on each day Date revenue buyers SELECT pt.Date (2) Top payers: Create a table to display the top one payer on each day Date memberID

(3) A distribution of # days active within a week: Create a table to show how many members are active for 1 day, 2days, 3days,7days during 3/1-3/7.

#Days Active Count 1 2 3 4 5 6 7

(4) Active but not payers: Create a table to display people who were active but did not pay on each day Date memberID

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

Explain which of these compounds is the weaker base? :Z 0 HIN:

Answered: 1 week ago

Question

=+ (e) The probability in Problem 2.15.

Answered: 1 week ago