SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Help me to write a query please
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

atokys
Starting Member

1 Posts

Posted - 11/09/2013 :  05:31:14  Show Profile  Reply with Quote
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

44 Posts

Posted - 11/12/2013 :  08:39:47  Show Profile  Reply with Quote
What have you tried?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000