diff --git a/dal/db_query/queries.sql b/dal/db_query/queries.sql index f5a1d78..4e4f377 100644 --- a/dal/db_query/queries.sql +++ b/dal/db_query/queries.sql @@ -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 ) diff --git a/dal/sqlcgen/queries.sql.go b/dal/sqlcgen/queries.sql.go index 44f8f59..8cd7213 100644 --- a/dal/sqlcgen/queries.sql.go +++ b/dal/sqlcgen/queries.sql.go @@ -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 )