There is a database that contains a website's traffic data over a period of 30 days....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
There is a database that contains a website's traffic data over a period of 30 days. The first table contains users' information including the user type (user, crawler, admin). The second table consists of the time of each visit to the website, the id of the visitor, time spent on the website in seconds. Write an SQL query to show the 3 day moving average of time spent on the website for users.user_type = 'user'. Note: avg time spent must have 4 decimal digits and rounded off (example: 5/3 = 1.6667, 5/2 = 2.5000 and 1/3= 0.3333) ▼ Schema There are 2 tables: users, traffic Name id name Name user_type VARCHAR Type of the user user_id visited_on users time spent Type Description INTEGER The user's unique id. It is the primary key. VARCHAR This is the second column and the name of the user. traffic Type INTEGER DATE INTEGER time spent on website in seconds Description id of the user from the users table. date on which the user visited the website There is a database that contains a website's traffic data over a period of 30 days. The first table contains users' information including the user type (user, crawler, admin). The second table consists of the time of each visit to the website, the id of the visitor, time spent on the website in seconds. Write an SQL query to show the 3 day moving average of time spent on the website for users.user_type = 'user'. Note: avg time spent must have 4 decimal digits and rounded off (example: 5/3 = 1.6667, 5/2 = 2.5000 and 1/3= 0.3333) ▼ Schema There are 2 tables: users, traffic Name id name Name user_type VARCHAR Type of the user user_id visited_on users time spent Type Description INTEGER The user's unique id. It is the primary key. VARCHAR This is the second column and the name of the user. traffic Type INTEGER DATE INTEGER time spent on website in seconds Description id of the user from the users table. date on which the user visited the website
Expert Answer:
Answer rating: 100% (QA)
3 day moving average of time spent on the website for usersusertype user can be calculated using ... View the full answer
Related Book For
Business Analytics Methods Models and Decisions
ISBN: 978-0321997821
2nd edition
Authors: James R. Evans
Posted Date:
Students also viewed these databases questions
-
Twin Elms was a famous commune founded by hippie idealists in 1972. Each person or family who joined the commune purchased a fee simple absolute in a one-acre lot and built a home. Because the...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
For the following exercises, you will address problems and answer questions from management at TAL Distributors. You do not use the TAL Distributors database for any of these exercises. 1. While...
-
Segment (Division) Evaluation In this assignment you will analyze the performance of PepsiCo's divisions. SFAS 131 requires publicly traded companies to disclose division information in the notes to...
-
Sketch the variation of the velocity and thermal boundary layer thicknesses with distance from the leading edge of a flat plate for the laminar flow of air, water engine oil and mercury. For each...
-
Dozier Company produced and sold 1 , 0 0 0 units during its first month of operations. It reported the following costs and expenses for the month: Direct materials $ 8 9 , 0 0 0 Direct labor $ 4 5 ,...
-
Consider the simple linear regression model fit to the rental price data from Problem 2.36. Data From Problem 2.36 Table B.24 contains data on median family home rental price and other data for 51 US...
-
Consider the following time series data: a. Compute MSE using the most recent value as the forecast for the next period. What is the forecast for month 8? b. Compute MSE using the average of all the...
-
It is anticipated that Jack Security will continue to generate $300 in cash flow in the near future. Jack's cost of equity capital is thirty percent, and the company is fully financed by equity. The...
-
Mr. M has been employed as an engineer by A Ltd., a company incorporated in Hong Kong. During the year ended 31 March 2019, Mr. M had the following income and expenditure. A monthly salary of...
-
Based on the companies’ market-to-book ratios, which company is doing better overall? What other ratios or financial information can help you justify its better market-value performance? A)...
-
Evaluate the strength and sustainability of internally generated competitive advantages using the VRIO model.
-
What is it about classic centrifuge models that in some way makes them unrealistic?
-
Geometrically, how do joints propagate?
-
What is an incompressible medium, and what is its Poissons ratio?
-
How are primary foliations recognized in deformed and metamorphosed sedimentary rocks?
-
1. What information can be deduced from a pedigree? Select the TWOanswers that are correct. the probability of a female being a carrier of an X-linkedallele how an X-linked trait is passed down over...
-
Floyd Distributors, Inc., provides a variety of auto parts to small local garages. Floyd purchases parts from manufacturers according to the EOQ model and then ships the parts from a regional...
-
The director of a nonprofit ballet company in a medium sized U. S. city is planning its next fundraising campaign. In recent years, the program has found the following percentages of donors and gift...
-
A marketing researcher surveyed 92 individuals, asking them if they liked a new product concept or not. The results are shown below: Convert the data into percentages. Then construct a chart of the...
-
Sandford Tile Company makes ceramic and porcelain tile for residential and commercial use. They produce three different grades of tile (for walls, residential flooring, and commercial flooring), each...
-
A probability experiment consists of rolling a single fair die. (a) Identify the outcomes of the probability experiment. (b) Determine the sample space. (c) Define the event E = roll an even number....
-
Sophia has three tickets to a concert, but Yolanda, Michael, Kevin, and Marissa all want to go to the concert with her. To be fair, Sophia randomly selects the two people who can go with her. (a)...
-
A pair of fair dice is rolled. Fair die are die where each outcome is equally likely. (a) Compute the probability of rolling a seven. (b) Compute the probability of rolling snake eyes; that is,...
Study smarter with the SolutionInn App