Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

Can someone help me with creating queries for the below information at the Earliest ??? Thanks in advance

$
0
0
Try to write the simplest query that fully answers the question, avoiding unnecessary complexity.These tables from our data warehouse provide enough information to answer (you may not need all of them).● articles_pageviewstable description: each row of the table contains information about a unique pageview made by a user to articles on our web-sitefields: pageview_timestamp, article_id, visitor_user_id, url● articlestable description: each row of the table contains information about a unique article published on our web-sitefields: article_id, title, publication_timestamp, author, first_comment_created_at(timestamp), number_of_comments* if there were no comments on article field first_comment_created_at will be null and field number_of_comments will be equal to 0** key field to join between 2 tables is “article_id”1. Visitors to our website read articles that they can comment on, in an ongoing process. Please, write an SQL query that will return a list of articles and number of page views made to those articles while there were still no comments on them (note, you should exclude articles with no comments at all). Please order the output in descending order of the column with number of page views2. Please write an SQL query that will answer the following question:What is the probability that article will have comment on it? Please, assume that if article is commented - it is commented during the first week after publication and has no new comments afterwards3. Please write an SQL query that will answer the following question:What’s an average number of comments made per article? Please, assume that if article is commented - it is commented during the first week after publication and has no new comments afterwards

Viewing all articles
Browse latest Browse all 6525

Trending Articles