Skip to content

Instantly share code, notes, and snippets.

@q0rban
Created March 26, 2014 16:21
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 q0rban/9787151 to your computer and use it in GitHub Desktop.
Save q0rban/9787151 to your computer and use it in GitHub Desktop.
SELECT nid, title, date(from_unixtime(d.field_publish_date_value)), f.field_show_target_id from node n
left join `field_data_field_show` f
on n.vid = f.revision_id and f.entity_type = 'node'
inner join field_data_field_publish_date d
on n.vid = d.revision_id and d.entity_type = 'node'
where n.type = 'theplatform_video'
and f.field_show_target_id is not null
order by d.field_publish_date_value desc
limit 100;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment