Skip to content

Instantly share code, notes, and snippets.

@ben-ng ben-ng/test.sql
Created Apr 10, 2014

Embed
What would you like to do?
SELECT
people."id" AS "people#id", people."created_at" AT TIME ZONE 'UTC' AS "people#created_at", people."updated_at" AT TIME ZONE 'UTC' AS "people#updated_at", people."family_name" AS "people#family_name", people."given_name" AS "people#given_name", people."title" AS "people#title", people."description" AS "people#description", people."child_person_id" AS "people#child_person_id", people."admin_event_id" AS "people#admin_event_id", people."owner_event_id" AS "people#owner_event_id",
events."id" AS "events#id", events."created_at" AT TIME ZONE 'UTC' AS "events#created_at", events."updated_at" AT TIME ZONE 'UTC' AS "events#updated_at", events."title" AS "events#title", events."description" AS "events#description",
photos."id" AS "photos#id", photos."created_at" AT TIME ZONE 'UTC' AS "photos#created_at", photos."updated_at" AT TIME ZONE 'UTC' AS "photos#updated_at", photos."title" AS "photos#title", photos."description" AS "photos#description", photos."location" AS "photos#location", photos."taken_at" AT TIME ZONE 'UTC' AS "photos#taken_at", photos."event_id" AS "photos#event_id"
FROM people
LEFT OUTER JOIN participations participations_join ON (people."id" = participations_join."person_id")
LEFT OUTER JOIN events events ON (participations_join."event_id" = events."id")
LEFT OUTER JOIN photos photos ON (events."id" = photos."event_id")
WHERE (people."id" = '6E4B91DD-B8FD-4552-A4A8-F05F5DB4286B');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.