Skip to content

Instantly share code, notes, and snippets.

@hoavt-54
Forked from mrbongiolo/fql_query_page_photos.fql
Last active August 29, 2015 14:12
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 hoavt-54/696a163de59843b8d9f2 to your computer and use it in GitHub Desktop.
Save hoavt-54/696a163de59843b8d9f2 to your computer and use it in GitHub Desktop.
# Formatted for readability
SELECT src, src_height, src_width, src_small, src_small_height, src_small_width
FROM photo
WHERE pid IN (SELECT pid
FROM photo_tag
WHERE subject='243117879034102' )
OR
pid IN (SELECT pid
FROM photo
WHERE aid IN (SELECT aid
FROM album
WHERE owner='243117879034102' AND type!='profile' )
)
# One line query
SELECT src, src_height, src_width, src_small, src_small_height, src_small_width FROM photo WHERE pid IN (SELECT pid FROM photo_tag WHERE subject='243117879034102') OR pid IN (SELECT pid FROM photo WHERE aid IN (SELECT aid FROM album WHERE owner='243117879034102' AND type!='profile'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment