Skip to content

Instantly share code, notes, and snippets.

@besquared
Created March 18, 2009 22:13
Show Gist options
  • Select an option

  • Save besquared/81441 to your computer and use it in GitHub Desktop.

Select an option

Save besquared/81441 to your computer and use it in GitHub Desktop.
# find(
# :select => 'DISTINCT identity_providers.*',
# :joins => [:datasources],
# :conditions => 'datasources.pull'
# )
SELECT DISTINCT identity_providers.*
FROM identity_providers
INNER JOIN datasources
ON identity_providers.id = datasources.identity_provider_id
WHERE datasources.pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment