Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Julien Portalier's latest activity

Wednesday, September 29 2010
5721 count with group by discards :distinct option was updated in Ruby on Rails
  • Julien Portalier
    Julien Portalier commented at 11:54 AM

    Here is an example: I have posts published by users, and I want to know how many different users are publishing posts everyday.

    Post.create(:user_id => 1, :cre...
Tuesday, September 28 2010
5721 count with group by discards :distinct option was created in Ruby on Rails
  • Julien Portalier
    Julien Portalier created the ticket at 10:10 AM

    A simple count does generate the correct SQL :

    Post.count(:user_id, :distinct => true)
    # SELECT COUNT(DISTINCT "posts"."user_id") AS "count_user_id" FROM "post...