Hi Ian,

Could you give this kludgish SQL query a test-drive and let me know if
it helps? For all I know this may be very silly, in which case apologies for
sticking my neck into this expert discussion...

    select
      titleid
      ,avg(rating) as avg
      ,count(titleid) as votes
      ,avg(rating)/count(rating) as weighted
      ,(avg(rating)/count(rating))/count(titleid) as ordering
    from
      movieratings
    group by titleid
    order by avg desc, ordering
    ;


Wondering,
Shanx


Shashank Tripathi
www.shanx.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to