Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Help me to write a query please

Author  Topic 

atokys
Starting Member

1 Post

Posted - 2013-11-09 : 05:31:14
I have two tables
?website_pageviews
table description: each row of the table contains information about a unique pageview made by a user
fields:pageview_timestamp, article_id, visitor_ip_address, visitor_user_id, browser, referrer

?comments
table description: each row of the table contains information about a unique comment made
fields:commented_article_id, commenting_user_id, comment_creation_timestamp, comment_text

Visitors read articles that they can comment on, in an ongoing process. Therefore, the number of comments on an article when a pageview occurs will vary, it can be different for the same article being read at different times.
Write an SQL query to tell the average number of comments that are present on an article when apageview of that article on the website occurs.

Mar
Starting Member

47 Posts

Posted - 2013-11-12 : 08:39:47
What have you tried?
Go to Top of Page
   

- Advertisement -