added in QuestionsStatistics some !=start

This commit is contained in:
pasha1coil 2025-08-24 09:46:09 +03:00
parent 1383dbaa3a
commit db6777276d
2 changed files with 8 additions and 6 deletions

@ -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