Jake. wrote:
>> SELECT
>> AVG(r.rating) AS rating,
>> r.LinkIDFK2
>> FROM
>> Reviews r INNER JOIN Traffic t
>> ON r.LinkIDFK2 = t.LinkIDFK
>> GROUP BY
>> LinkIDFK2
>> ORDER BY
>> rating DESC,
>> t.Hits DESC
>>
>> Depending on your database you can usually limit the numer of
>> results by using LIMIT or TOP.
>
>
> I'm currently using Access. I tried to plop this code in but got an error:
>
> [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] You tried to execute a query that does not include the specified _expression_ 'rating' as part of an aggregate function.

SELECT
AVG(r.rating) AS rating,
r.LinkIDFK2
FROM
Reviews r INNER JOIN Traffic t
ON r.LinkIDFK2 = t.LinkIDFK
GROUP BY
LinkIDFK2
ORDER BY
AVG(r.rating) DESC,
t.Hits DESC

Jochem

--
I don't get it
immigrants don't work
and steal our jobs
     - Loesje
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to