YQL nest query

I wanted to use YQL to build a query to grab photos on an account with certain tags that I could then render on a page. The just gets you the photo’s id and not all the other goodness that is required to make the image display.

So I built a nested query in YQL to get the job done.

select farm, id, secret, server, title
where photo_id in (select id from where user_id='<your_user_id>' and tags='soccer,men')

So in one call it’s gets the id of the photos that meet your initial query:

select id from where user_id='<your_user_id>' and tags='soccer,men'

It then takes the id’s from that query and grabs the that you need, all in one call! Very cool stuff.

Go to the YQL Console and play around.