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 SUM(LENGTH(`wiki_revision`.`content`)) | |
| FROM `wiki_document` | |
| JOIN `wiki_document_products` ON `wiki_document`.`id` = `wiki_document_products`.`document_id` | |
| JOIN `wiki_revision` ON `wiki_document`.`current_revision_id` = `wiki_revision`.`id` | |
| WHERE `wiki_document`.`locale`="en-US" | |
| #AND `wiki_document_products`.`product_id` = 1 | |
| AND `wiki_document`.`is_archived` = 0 | |
| AND `wiki_document`.`current_revision_id` IS NOT NULL | |
| AND `wiki_document`.`html` NOT LIKE '%REDIRECT%' | |
| #AND `wiki_document`.`html` LIKE '%data-for%' |
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 * | |
| FROM `wiki_document` | |
| WHERE `wiki_document`.`category` = 60 | |
| AND `wiki_document`.`title` NOT LIKE "Template:%" | |
| AND `wiki_document`.`html` LIKE "%REDIRECT%" |
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 DISTINCT `questions_question`.`id` | |
| FROM `questions_question` | |
| RIGHT JOIN `questions_questionmetadata` ON `questions_questionmetadata`.`question_id` = `questions_question`.`id` | |
| WHERE `questions_question`.`created` BETWEEN '2013-05-01 0' AND '2013-06-01 0' | |
| AND `questions_question`.`product_id` = 1 | |
| AND `questions_questionmetadata`.`name` = "troubleshooting" |
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 count(*) | |
| FROM `questions_answer` | |
| JOIN `questions_question` ON `questions_question`.`id` = `questions_answer`.`question_id` | |
| WHERE `questions_answer`.`created` BETWEEN '2015-01-01' AND '2015-05-01' | |
| AND `questions_answer`.`creator_id` != `questions_question`.`creator_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 count(*) | |
| FROM `questions_answer` | |
| WHERE `questions_answer`.`created` BETWEEN '2015-01-01' AND '2015-05-01' |
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 `customercare_reply`.`created`, count(*) | |
| FROM `customercare_reply` | |
| WHERE `customercare_reply`.`created` BETWEEN '2015-01-01' AND '2015-05-01' | |
| GROUP BY month(`customercare_reply`.`created`) |
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_revision`.`id` | |
| FROM `wiki_revision` | |
| WHERE `wiki_revision`.`created` >= '2015-01-01 0' | |
| AND `wiki_revision`.`created` < '2015-05-01 0' |
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_document`.`id`, `wiki_document`.`title` | |
| FROM `wiki_document` | |
| WHERE `wiki_document`.`is_template` = 0 | |
| AND `wiki_document`.`is_archived` = 0 | |
| AND (`wiki_document`.`category` = 10 OR `wiki_document`.`category` = 20) |
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_document`.`id`, `wiki_document`.`title` | |
| FROM `wiki_document` | |
| WHERE `wiki_document`.`locale` = "en-US" | |
| AND `wiki_document`.`is_template` = 0 | |
| AND `wiki_document`.`is_archived` = 0 | |
| AND (`wiki_document`.`category` = 10 OR `wiki_document`.`category` = 20) |
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 `auth_user`.`username`, count(*) as votes | |
| FROM `questions_answer` | |
| JOIN `questions_answervote` ON `questions_answervote`.`answer_id` = `questions_answer`.`id` | |
| JOIN `questions_question` ON `questions_question`.`id` = `questions_answer`.`question_id` | |
| JOIN `auth_user` ON `auth_user`.`id` = `questions_answer`.`creator_id` | |
| WHERE `questions_answervote`.`created` >= '2014-01-01' AND`questions_answervote`.`created` <= '2014-12-01' | |
| AND `questions_question`.`product_id`=2 | |
| AND `questions_answervote`.`helpful`=1 | |
| GROUP by `questions_answer`.`creator_id` ORDER BY votes DESC limit 100 |