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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | 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
 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

47 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  
 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.03 seconds. Powered By: Snitz Forums 2000