Skip to content

Instantly share code, notes, and snippets.

@atopal
Created August 2, 2013 09:56
Show Gist options
  • Select an option

  • Save atopal/6138772 to your computer and use it in GitHub Desktop.

Select an option

Save atopal/6138772 to your computer and use it in GitHub Desktop.
Taking a sample for the reports on the forum
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"
@turtlelovesshoes
Copy link

SELECT *
FROM questions_question
INNER JOIN test ON questions_answer. question_id = questions_question. solution_id
WHERE questions_question.created > "2014-07-01 0"
AND questions_question.created < "2014-07-31 0"
AND questions_question.locale LIKE "en-US"
ORDER BY questions_question. created ASC;

@atopal
Copy link
Author

atopal commented Aug 5, 2014

JOIN test ON questions_answer. question_id = questions_question.id

@atopal
Copy link
Author

atopal commented Aug 5, 2014

SELECT *
FROM questions_question
INNER JOIN questions_answer ON questions_answer. question_id = questions_question.id
WHERE questions_question.created > "2014-07-01 0"
AND questions_question.created < "2014-07-31 0"
AND questions_question.locale LIKE "en-US"
ORDER BY questions_question.created ASC;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment