update sqlc gen
This commit is contained in:
parent
3c3445b8fc
commit
30e78b4dc5
@ -545,6 +545,7 @@ WITH Funnel AS (
|
||||
SELECT
|
||||
q.id,
|
||||
q.title,
|
||||
a.content,
|
||||
COUNT(*) AS total_answers
|
||||
FROM
|
||||
question q
|
||||
@ -555,14 +556,14 @@ WITH Funnel AS (
|
||||
AND a.created_at >= TO_TIMESTAMP($2)
|
||||
AND a.created_at <= TO_TIMESTAMP($3)
|
||||
GROUP BY
|
||||
q.id, q.title
|
||||
q.id, q.title, a.content
|
||||
) q ON a.question_id = q.id
|
||||
WHERE
|
||||
a.quiz_id = $1
|
||||
AND a.created_at >= TO_TIMESTAMP($2)
|
||||
AND a.created_at <= TO_TIMESTAMP($3)
|
||||
GROUP BY
|
||||
q.title, q.total_answers
|
||||
q.title, a.content, q.total_answers
|
||||
HAVING
|
||||
COUNT(*) >= 1
|
||||
)
|
||||
|
@ -1639,6 +1639,7 @@ WITH Funnel AS (
|
||||
SELECT
|
||||
q.id,
|
||||
q.title,
|
||||
a.content,
|
||||
COUNT(*) AS total_answers
|
||||
FROM
|
||||
question q
|
||||
@ -1649,14 +1650,14 @@ WITH Funnel AS (
|
||||
AND a.created_at >= TO_TIMESTAMP($2)
|
||||
AND a.created_at <= TO_TIMESTAMP($3)
|
||||
GROUP BY
|
||||
q.id, q.title
|
||||
q.id, q.title, a.content
|
||||
) q ON a.question_id = q.id
|
||||
WHERE
|
||||
a.quiz_id = $1
|
||||
AND a.created_at >= TO_TIMESTAMP($2)
|
||||
AND a.created_at <= TO_TIMESTAMP($3)
|
||||
GROUP BY
|
||||
q.title, q.total_answers
|
||||
q.title, a.content, q.total_answers
|
||||
HAVING
|
||||
COUNT(*) >= 1
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user