added in QuestionsStatistics some !=start
This commit is contained in:
parent
1383dbaa3a
commit
db6777276d
@ -545,6 +545,7 @@ SELECT
|
||||
AND a.created_at >= TO_TIMESTAMP($2)
|
||||
AND a.created_at <= TO_TIMESTAMP($3)
|
||||
AND a.result = TRUE
|
||||
AND a.start = FALSE
|
||||
GROUP BY
|
||||
q.title, a.quiz_id, a.result
|
||||
HAVING
|
||||
@ -567,7 +568,7 @@ SELECT
|
||||
QuizAnswers
|
||||
WHERE
|
||||
quiz_id = $1
|
||||
AND start != true
|
||||
AND start = FALSE
|
||||
AND created_at >= TO_TIMESTAMP($2)
|
||||
AND created_at <= TO_TIMESTAMP($3)
|
||||
GROUP BY
|
||||
@ -588,7 +589,7 @@ SELECT
|
||||
JOIN answer a ON q.id = a.question_id
|
||||
WHERE
|
||||
a.quiz_id = $1
|
||||
AND a.start != true
|
||||
AND a.start = FALSE
|
||||
AND a.created_at >= TO_TIMESTAMP($2)
|
||||
AND a.created_at <= TO_TIMESTAMP($3)
|
||||
GROUP BY
|
||||
|
||||
@ -4805,6 +4805,7 @@ SELECT
|
||||
AND a.created_at >= TO_TIMESTAMP($2)
|
||||
AND a.created_at <= TO_TIMESTAMP($3)
|
||||
AND a.result = TRUE
|
||||
AND a.start = FALSE
|
||||
GROUP BY
|
||||
q.title, a.quiz_id, a.result
|
||||
HAVING
|
||||
@ -4827,7 +4828,7 @@ SELECT
|
||||
QuizAnswers
|
||||
WHERE
|
||||
quiz_id = $1
|
||||
AND start != true
|
||||
AND start = FALSE
|
||||
AND created_at >= TO_TIMESTAMP($2)
|
||||
AND created_at <= TO_TIMESTAMP($3)
|
||||
GROUP BY
|
||||
@ -4848,7 +4849,7 @@ SELECT
|
||||
JOIN answer a ON q.id = a.question_id
|
||||
WHERE
|
||||
a.quiz_id = $1
|
||||
AND a.start != true
|
||||
AND a.start = FALSE
|
||||
AND a.created_at >= TO_TIMESTAMP($2)
|
||||
AND a.created_at <= TO_TIMESTAMP($3)
|
||||
GROUP BY
|
||||
|
||||
Loading…
Reference in New Issue
Block a user