|
-
Dec 26th, 2005, 12:38 PM
#1
Thread Starter
Addicted Member
Need Help with SQL statement
Hi Guys!
I have two tables, one with store information and one with reviews of the store. The have each have a foreign key (idstore) to connect them.
In the reviews table, I have an overall_ratings field.
Reviews
-------------------------------------------------------
storeid | overall_rating | MallId | Reviewerid | Comments |DateofReview
-------------------------------------------------------
StoreInfo
-----------------------------------
storeid | stroename| hours
-----------------------------------
Now the tricky part is that I want to grab the latest store review information(from the table reviews) and the storename (from the StoreInfo table) for the stores that have the top 10 (highest) averaged reviews.
So in other words, I want to retreive the last review for the store that is in the top ten for the averaged overall_ratings.
I am using asp.net so I can store info in an array if neccessary. I can come up with parts of this, but the real logic is escaping me.
Thanks in Advance.
Bebandit
Last edited by bebandit; Dec 26th, 2005 at 03:17 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|