Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The site FoxNews.com wants to perform some in-depth analysis on its user activities in 2020. FoxNews.com has various pages for users to view as well

The site FoxNews.com wants to perform some in-depth analysis on its user activities in 2020. FoxNews.com has various pages for users to view as well as videos on the pages that can be played. These Page Views and Video Views are recorded as hits in a SQL database, particularly in the table hit_data below. In addition to the hit_data table, there are various reference tables that are referenced for analysis. One interesting one is the subscribers table, which has user level information on subscribers only.

Functions that can be used:

For date manipulation, youre given the functions DAY(datetime), MONTH(datetime), and YEAR(datetime). These functions will output the part of the date timestamp inputted. Assume that theyll give you what you desire (either a date value (MONTH(2020-12-13) = 2020-12-01) or an integer (MONTH(2020-12-13) = 12)) (does not matter which you assume). You can also use any date parsing function available in SQL.

The tables are defined as:

Table Name: hit_data

Field Name

Data Type

Definition

date_timestamp

datetime

timestamp of hit

user_id

varchar

Unique ID for a given user, whether they are a subscriber or not. All hits have a user_id associated with them

hit_type

varchar

The type of hit, Page View or Video Start

hit_id

varchar

A unique ID for the hit

page_id

varchar

Unique ID for the Page. Is always present since even video hits are played on a page

video_id

varchar

Unique ID for the Video. Is null when the hit is a Video Start

Table Name: pages

Field Name

Data Type

Definition

page_id

varchar

Unique ID for the Page.

page_name

varchar

Name of the Page

page_type

varchar

Type of Page, ex: Homepage, Article, Sign In, etc.

Table Name: videos

Field Name

Data Type

Definition

video_id

varchar

Unique ID for the Video

video_name

varchar

Name of the Video

video_type

varchar

Type of Video

Table Name: subscribers

Field Name

Data Type

Definition

user_id

varchar

Unique User ID for the User and is only available if the user is a subscriber

user_name_first

varchar

First Name User provided on Sign Up

user_name_last

varchar

Last Name User provided on Sign Up

state_residence

varchar

State of User provided on Sign Up

Examples of data in tables:

Table Name: hit_data

date_timestamp

user_id

hit_type

hit_id

page_id

video_id

12/1/20 13:32

3342027

Page View

0cc175b

c4ca4238a0b923820dcc509a6f75849b

(null)

12/1/20 13:34

3342027

Video Start

92eb5ff

c4ca4238a0b923820dcc509a6f75849b

912ec803b2ce49e4a541068d495ab570

pages

page_id

page_name

page_type

c4ca4238a0b923820dcc509a6f75849b

Fox News Homepage

Homepage

d3eb9a9233e52948740d7eb8c3062d14

Article Name Here

Article

videos

video_id

video_name

video_type

912ec803b2ce49e4a541068d495ab570

Fox News Go

Livestream

subscribers

user_id

user_name_first

user_name_last

state_residence

3342027

John

Smith

NJ

  1. How many subscribers visited the site during May 2020?
  2. How many non-subscribers visited the site during May 2020?

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

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

u = 5 j , v = 6 i Find the angle between the vectors.

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago