update sqlc gen
This commit is contained in:
parent
6218cbd69c
commit
ad4a8f77dc
@ -503,7 +503,7 @@ WITH Funnel AS (
|
|||||||
SELECT
|
SELECT
|
||||||
q.title AS question_title,
|
q.title AS question_title,
|
||||||
COUNT(*) AS total_answers,
|
COUNT(*) AS total_answers,
|
||||||
COUNT(*) * 100.0 / NULLIF(SUM(COUNT(*)) FILTER (WHERE a.result = TRUE) OVER (PARTITION BY a.quiz_id), 0) AS percentage
|
CAST(COUNT(*) * 100.0 / NULLIF(SUM(COUNT(*)) FILTER (WHERE a.result = TRUE) OVER (PARTITION BY a.quiz_id), 0) AS FLOAT8) AS percentage
|
||||||
FROM
|
FROM
|
||||||
question q
|
question q
|
||||||
JOIN answer a ON q.id = a.question_id
|
JOIN answer a ON q.id = a.question_id
|
||||||
|
@ -1597,7 +1597,7 @@ WITH Funnel AS (
|
|||||||
SELECT
|
SELECT
|
||||||
q.title AS question_title,
|
q.title AS question_title,
|
||||||
COUNT(*) AS total_answers,
|
COUNT(*) AS total_answers,
|
||||||
COUNT(*) * 100.0 / NULLIF(SUM(COUNT(*)) FILTER (WHERE a.result = TRUE) OVER (PARTITION BY a.quiz_id), 0) AS percentage
|
CAST(COUNT(*) * 100.0 / NULLIF(SUM(COUNT(*)) FILTER (WHERE a.result = TRUE) OVER (PARTITION BY a.quiz_id), 0) AS FLOAT8) AS percentage
|
||||||
FROM
|
FROM
|
||||||
question q
|
question q
|
||||||
JOIN answer a ON q.id = a.question_id
|
JOIN answer a ON q.id = a.question_id
|
||||||
@ -1659,7 +1659,7 @@ type QuestionsStatisticsRow struct {
|
|||||||
CountFResultWithTQuestion int64 `db:"count_f_result_with_t_question" json:"count_f_result_with_t_question"`
|
CountFResultWithTQuestion int64 `db:"count_f_result_with_t_question" json:"count_f_result_with_t_question"`
|
||||||
CountTResult int64 `db:"count_t_result" json:"count_t_result"`
|
CountTResult int64 `db:"count_t_result" json:"count_t_result"`
|
||||||
ResultsTitle string `db:"results_title" json:"results_title"`
|
ResultsTitle string `db:"results_title" json:"results_title"`
|
||||||
ResultsPercentage int32 `db:"results_percentage" json:"results_percentage"`
|
ResultsPercentage float64 `db:"results_percentage" json:"results_percentage"`
|
||||||
QuestionsTitle string `db:"questions_title" json:"questions_title"`
|
QuestionsTitle string `db:"questions_title" json:"questions_title"`
|
||||||
AnswerContent sql.NullString `db:"answer_content" json:"answer_content"`
|
AnswerContent sql.NullString `db:"answer_content" json:"answer_content"`
|
||||||
QuestionsPercentage float64 `db:"questions_percentage" json:"questions_percentage"`
|
QuestionsPercentage float64 `db:"questions_percentage" json:"questions_percentage"`
|
||||||
|
Loading…
Reference in New Issue
Block a user