Skip to content

Instantly share code, notes, and snippets.

@atopal
Created July 15, 2013 18:51
Show Gist options
  • Select an option

  • Save atopal/6002388 to your computer and use it in GitHub Desktop.

Select an option

Save atopal/6002388 to your computer and use it in GitHub Desktop.
List articles with no new revision since x
SELECT `wiki_document`.`id`, `wiki_revision`.`created` , `wiki_document`.`slug`, `wiki_document`.`title`
From `wiki_document`
JOIN `wiki_revision` ON `wiki_revision`.`id`=`wiki_document`.`current_revision_id`
WHERE `wiki_revision`.`created` < '2012-07-12'
AND `wiki_document`.`locale` LIKE "en-US"
AND (`wiki_document`.`category` = "10" OR `wiki_document`.`category` = "20")
AND `wiki_document`.`is_archived` = "0"
AND `wiki_revision`.`is_approved` = "1"
AND `wiki_revision`.`content` NOT LIKE "REDIRECT%"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment