Skip to content

Instantly share code, notes, and snippets.

@NetguruGist
Created November 3, 2015 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NetguruGist/6b8a6b5df4a69018237b to your computer and use it in GitHub Desktop.
Save NetguruGist/6b8a6b5df4a69018237b to your computer and use it in GitHub Desktop.
query3 ruby
> ActiveRecord::Base.connection.execute("select count(*) from ( select distinct market_id from selections) as foo ").entries
(3717.6ms) select count(*) from ( select distinct market_id from selections) as foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment