Created
December 23, 2014 11:30
-
-
Save atopal/d774e7f6624a58f810f4 to your computer and use it in GitHub Desktop.
Number of solutions per forum contributor per locale per product
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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment