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:
![](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/09/65044ef2a91b8_1694781169639.jpg)
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...
-
According to RBC theory, how does a fall in productivity growth influence investment demand, the market for loanable funds, the real interest rate, the demand for labour, the supply of labour,...
-
In Exercises find dy/dx by implicit differentiation. cos(x + y) = x
-
2-4. What is the difference between an organizations business and its goals?
-
What would happen to the sampling distribution of the mean if we increased sample size from 5 to 25?
-
P11-30. Munchkin Bakery Co. of Timmins pays its employees every two weeks (26 pay Recording benefits expense and periods each year). There are two pay periods for March and the details for each...
-
Amadeus Corporation is considering the issue of a new product to be added to its product mix. They hired you, a recent business graduate from MacEwan, for conducting the analysis. The production line...
-
(1 point) A cylindrical drill with radius 1 is used to bore a hole through the center of a sphere of radius 4. Find the volume of the ring shaped solid that remains. 27pi Preview My Answers Submit...
-
Determine the magnitude of the magnetic flux through the south-facing window of a house in British Columbia, where Earth's B field has a magnitude of 5.8 x 10-5T and the direction of B field is 72...
-
A wedge with an inclination of angle rests next to a wall. A block of mass m is sliding down the plane, as shown. There is no friction between the wedge and the block or between the wedge and the...
-
Conner Leonard worked for Purges Manufacturing for 32 years. Along with four other men, he helped to start the company that designed and built products sold around the world. Purges Manufacturing...
-
Reconsider the collision between two objects diagrammed below where two objects move on a frictionless surface. Before collision After collision Experiment 1 A, 1 B A B Draw complete and properly...
-
3. Now the bomb arrives. Please catch fx,y(x, y) = = cx cx - dy, where 0 < x < 1, 0 y x. 13 a) Please find coefficients c, d such that cd= 8 b) Please find fx(x) and fy (y). Are X and Y independent?...
-
Can the bookkeeper be the accountant? Can the accountant be the bookkeeper? Why? Why not
-
How has the too-big-to-fail policy been limited in the FDICIA legislation? How might limiting the too-big-to-fail policy help reduce the risk of a future banking crisis?
-
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...
-
25. Which of the following is true about the statement of cash flows for the proprietary funds of a state or local government? a. The indirect method of reporting cash flows from operating activities...
-
18. Which of the following is not necessary for a special purpose local government to be viewed as a primary government for reporting purposes? a. It must have a separately elected governing body. b....
-
17. Which of the following is true about the managements discussion and analysis (MD&A)? a. It is an optional addition to the comprehensive annual financial report, but the GASB encour ages its...
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App