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 edits | |
| FROM `wiki_revision` | |
| JOIN `wiki_document` on `wiki_revision`.`document_id`=`wiki_document`.`id` | |
| JOIN `auth_user`on `wiki_revision`.`creator_id`=`auth_user`.`id` | |
| WHERE `wiki_revision`.`created` >= '2013-01-01' | |
| AND `wiki_document`.`locale` LIKE 'en-US' | |
| GROUP BY `wiki_revision`.`creator_id` ORDER BY edits DESC; |
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`.`title` as doctitle, count(*) revisions | |
| FROM `wiki_revision` | |
| JOIN `wiki_document` on `wiki_revision`.`document_id`=`wiki_document`.`id` | |
| JOIN `auth_user`on `wiki_revision`.`creator_id`=`auth_user`.`id` | |
| WHERE `wiki_revision`.`created` >= '2010-01-01 0' | |
| AND `wiki_revision`.`created` < '2013-01-01 0' | |
| AND `wiki_document`.`locale` LIKE 'en-US' | |
| AND `auth_user`.`username` LIKE 'verdi' | |
| GROUP BY `wiki_document`.`title` ORDER BY revisions DESC; |
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`.`twitter_username`, `auth_user`.`username` as 'SUMO_username', count(*) as 'tweets' | |
| FROM `customercare_reply` | |
| LEFT JOIN `auth_user` on `auth_user`.`id`=`customercare_reply`.`user_id` | |
| WHERE `customercare_reply`.`created` >= '2013-04-02 0' | |
| GROUP BY `customercare_reply`.`twitter_username` ORDER BY COUNT(*) DESC; |
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 username, count(distinct(question_id)) as threadnum | |
| FROM questions_question qq | |
| JOIN questions_answer qa ON qa.question_id = qq.id | |
| JOIN auth_user au ON qa.creator_id = au.id | |
| WHERE qa.created > '2012-10-24' and qa.created <= '2013-04-24' | |
| AND NOT qa.creator_id = qq.creator_id | |
| GROUP BY username ORDER BY threadnum DESC LIMIT 50 |
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 username, count(distinct(document_id)) as reveditnum | |
| FROM | |
| ( | |
| SELECT username, document_id | |
| FROM wiki_revision wr | |
| JOIN auth_user au ON wr.creator_id = au.id | |
| JOIN wiki_document wd ON wr.document_id = wd.id | |
| WHERE created > '2012-10-24' and created <= '2013-04-24' | |
| AND wd.locale = 'en-US' | |
| UNION |
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
| # Shows number users registering per day | |
| SELECT DATE(`auth_user`.`date_joined`), count(*) | |
| FROM `auth_user` | |
| WHERE DATE(`auth_user`.`date_joined`) > '2012-12-01' | |
| GROUP BY DATE(`auth_user`.`date_joined`); |
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 DATE(`questions_question`.`created`), count(*) | |
| FROM `questions_question` | |
| WHERE DATE(`questions_question`.`created`) > '2012-12-01' | |
| GROUP BY DATE(`questions_question`.`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`.`summary`, DATEDIFF(`wiki_revision`.`reviewed`,`wiki_revision`.`created`) | |
| FROM `wiki_revision` | |
| JOIN `wiki_document` ON `wiki_document`.`id`=`wiki_revision`.`document_id` | |
| WHERE `wiki_document`.`locale` LIKE 'en-US' | |
| AND `wiki_revision`.`created` >= '2013-01-01' | |
| AND DATEDIFF(`wiki_revision`.`reviewed`,`wiki_revision`.`created`) >=30; |
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_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%" |
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 `questions_question` | |
| WHERE `questions_question`.`created` > "2013-06-25 0" | |
| AND `questions_question`.`created` < "2013-07-10 0" | |
| AND `questions_question`.`locale` LIKE "en-US" |