Skip to content

Instantly share code, notes, and snippets.

@chad
Created August 24, 2009 18:29
Show Gist options
  • Save chad/174022 to your computer and use it in GitHub Desktop.
Save chad/174022 to your computer and use it in GitHub Desktop.
select joy_journeys.id from joy_journeys, memberships, profiles, circles
INNER JOIN memberships on memberships.circle_id = circles.id
INNER JOIN profiles on memberships.profile_id = profiles.id
INNER JOIN joy_journeys on joy_journeys.profile_id = profiles.id
WHERE circles.id = #{self.id}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment