Can any recommend a free forum like houseoffusion for SQL coding issues.
I've used sqlmag.com but they forums have little traffic.
>From the 2nd query, I'm trying to extract only records from 2nd query where
>the average of avg(ratingvalue) >=4 and I'm not sure how do do this.
1st Query
SELECT *
FROM dbo.recipes INNER JOIN
dbo.relrecipecats ON dbo.recipes.recipeID =
dbo.relrecipecats.recipeID INNER JOIN
dbo.recipecategories ON
dbo.relrecipecats.recipecategoryID = dbo.recipecategories.recipecategoryID
INNER JOIN
dbo.recipereviews ON dbo.recipes.recipeID =
dbo.recipereviews.recipeID INNER JOIN
dbo.ratings ON dbo.ratings.ratingID =
dbo.recipereviews.ratingID INNER JOIN
dbo.images ON dbo.recipes.imageID = dbo.images.imageID
WHERE recipes.imageID<>0 And recipereviews.ratingID >=4 AND
recipes.addressid = 0 AND (MONTH(datecreated) = MONTH(GETDATE()))
2nd Query
SELECT count(recipereviewID) AS totalratings, avg(ratingvalue) AS avgrating
FROM recipereviews INNER JOIN ratings ON recipereviews.ratingID =
ratings.ratingID
WHERE recipeID = #whatscookin.recipeID#
(I wanted to add to this with ) AND (avgrating) >= 4
(but I get an error, invalid column name avgrating)
(I've also tried)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258729
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4