Last active
August 29, 2015 14:10
-
-
Save atopal/7fc680cd3815ffcb1d50 to your computer and use it in GitHub Desktop.
Get all comments for an article by document ID
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT `wiki_helpfulvotemetadata`.`vote_id`, `wiki_helpfulvotemetadata`.`value` | |
FROM `wiki_revision` | |
JOIN `wiki_document` ON `wiki_revision`.`document_id` = `wiki_document`.`id` | |
JOIN `wiki_helpfulvote` ON `wiki_revision`.`id`= `wiki_helpfulvote`.`revision_id` | |
JOIN `wiki_helpfulvotemetadata` ON `wiki_helpfulvote`.`id` = `wiki_helpfulvotemetadata`.`vote_id` | |
WHERE `wiki_document`.`id`= "735" | |
AND `wiki_helpfulvote`.`helpful` = "0" | |
AND `wiki_helpfulvotemetadata`.`key` = "survey" | |
AND `wiki_helpfulvotemetadata`.`value` NOT LIKE '%comment": ""%' | |
AND `wiki_helpfulvote`.`created` BETWEEN '2014-11-01 0' AND '2014-12-01 0' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment