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 solutions | |
FROM `questions_question` | |
JOIN `questions_answer` ON `questions_question`.`solution_id`=`questions_answer`.`id` | |
JOIN `auth_user` ON `questions_answer`.`creator_id`=`auth_user`.`id` | |
WHERE `questions_answer`.`created` >= '2014-01-01' AND `questions_answer`.`created` <= '2014-12-01' | |
AND `questions_question`.`product_id`=2 | |
AND `questions_question`.`locale` = 'en-US' | |
GROUP BY `auth_user`.`id` ORDER by solutions DESC Limit 100; |
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(*) as answernum | |
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 >= '2014-01-01' and qa.created <= '2014-12-01 0' | |
AND qq.`product_id`=2 | |
AND NOT qa.creator_id = qq.creator_id | |
GROUP BY username ORDER BY answernum DESC limit 100; |
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`,`wiki_helpfulvote`.`created`, `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`.`locale` = "en-US" | |
AND `wiki_helpfulvote`.`helpful` = "0" | |
AND `wiki_helpfulvotemetadata`.`key` = "survey" | |
AND `wiki_helpfulvotemetadata`.`value` NOT LIKE '%comment": ""%' | |
AND `wiki_helpfulvote`.`created` BETWEEN '2014-11-05 0' AND '2014-11-06 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_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' |
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(*) as answernum | |
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 >= '2014-08-06' and qa.created <= '2014-10-06' | |
AND NOT qa.creator_id = qq.creator_id | |
GROUP BY username ORDER BY answernum 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 DISTINCT `auth_user`.`username` | |
FROM (SELECT * FROM `wiki_document_products` WHERE `wiki_document_products`.`product_id` = 4) FirefoxOSdocs | |
JOIN `wiki_document_contributors` ON `wiki_document_contributors`.`document_id` = FirefoxOSdocs.`document_id` | |
LEFT JOIN `auth_user` ON `auth_user`.`id` = `wiki_document_contributors`.`user_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_document`.`id`, group_concat(DISTINCT `products_product`.`title` SEPARATOR ', ') as 'products', group_concat(DISTINCT `products_topic`.`title` SEPARATOR ', ') as 'topics', `wiki_document`.`title`, `wiki_revision`.`created` as 'last updated' | |
FROM `wiki_document` | |
JOIN `wiki_document_products` ON `wiki_document_products`.`document_id` = `wiki_document`.`id` | |
JOIN `wiki_document_topics` ON `wiki_document_topics`.`document_id` = `wiki_document`.`id` | |
JOIN `wiki_revision` ON `wiki_revision`.`id`= `wiki_document`.`current_revision_id` | |
JOIN `products_product` ON `products_product`.`id` = `wiki_document_products`.`product_id` | |
JOIN `products_topic` ON `products_topic`.`id` = `wiki_document_topics`.`topic_id` | |
WHERE `wiki_document`.`locale` = "en-US" | |
GROUP BY `wiki_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 | |
all_votes.created_date, | |
all_votes.votes as all_votes, | |
FxFeeback_votes.votes as FxFeeback_votes, | |
didnt_work_votes.votes as didnt_work_votes, | |
too_long_votes.votes as too_long_votes, | |
confusing_votes.votes as confusing_votes, | |
other_votes.votes as other_votes, | |
round((FxFeeback_votes.votes / all_votes.votes*100),3) as Fx_Feedback_percentage, | |
round((didnt_work_votes.votes / all_votes.votes*100),3) as didnt_work_percentage, |
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 | |
all_questions.created_date, | |
all_questions.threads as all_threads, | |
no_replies.threads as not_replied, | |
needs_attenion.threads as needing_attention, | |
responded.threads as responded_threads, | |
solved.threads as solved_threads, | |
locked.threads as locked_threads, | |
round((no_replies.threads / all_questions.threads*100),3) as no_replies_percentage, | |
round((needs_attenion.threads / all_questions.threads*100),3) as ball_dropped_percentage, |
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 all_votes.created_date , positive_votes.votes as positive_votes, all_votes.votes as all_votes, (positive_votes.votes / all_votes.votes*100) as helpfulness | |
FROM | |
( | |
SELECT DATE(`wiki_helpfulvote`.`created`) as created_date, count(*) as votes | |
FROM `wiki_helpfulvote` | |
JOIN `wiki_helpfulvotemetadata` ON `wiki_helpfulvotemetadata`.`vote_id`=`wiki_helpfulvote`.`id` | |
WHERE `wiki_helpfulvote`.`created` BETWEEN "2012-09-10 0" AND "2012-09-11 0" | |
AND `wiki_helpfulvotemetadata`.`key` = "referrer" | |
AND `wiki_helpfulvotemetadata`.`value` LIKE "%.mozilla.org%" | |
AND `wiki_helpfulvotemetadata`.`value` NOT LIKE "%://support.mozilla.org%" |