Okay I will do that when I find the correct SQL, then I convert the SQL to rails if this can be done :-)
Thanks Tim for your SQL. But this gives me some weird error. select avg(url_count) from ( select count(url_id) as url_count, user_id from urls_users group by url_id limit 10 ); ERROR 1248 (42000): Every derived table must have its own alias -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

