Skip to content

Instantly share code, notes, and snippets.

@eviljeff
Created November 14, 2014 16:20
Show Gist options
  • Save eviljeff/ba00a916d8603827a6b1 to your computer and use it in GitHub Desktop.
Save eviljeff/ba00a916d8603827a6b1 to your computer and use it in GitHub Desktop.
SQL to output which approved & undisabled apps have at least one version that requires flash
select addons.id from
(SELECT * FROM addons WHERE status IN (2, 4, 13, 16) AND inactive = 0) AS addons
JOIN versions ON (versions.addon_id=addons.id)
JOIN (select * FROM files where uses_flash=1) AS files ON (files.version_id=versions.id)
GROUP BY addons.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment