update sqlc gen
This commit is contained in:
parent
153d15351a
commit
1748e7556c
@ -520,7 +520,7 @@ WITH Funnel AS (
|
||||
ta.total_answers,
|
||||
CASE
|
||||
WHEN ta.total_answers = 0 THEN NULL
|
||||
ELSE COUNT(*)::FLOAT / NULLIF(ta.total_answers, 0)
|
||||
ELSE CAST(COUNT(*)::FLOAT / NULLIF(ta.total_answers, 0) AS INTEGER)
|
||||
END AS percentage
|
||||
FROM
|
||||
answer a
|
||||
@ -545,7 +545,7 @@ WITH Funnel AS (
|
||||
a.content AS answer_content,
|
||||
CASE
|
||||
WHEN q.total_answers = 0 THEN NULL
|
||||
ELSE COUNT(*)::FLOAT / NULLIF(q.total_answers, 0)
|
||||
ELSE CAST(COUNT(*)::FLOAT / NULLIF(q.total_answers, 0) AS INTEGER)
|
||||
END AS percentage
|
||||
FROM
|
||||
answer a
|
||||
|
@ -1614,7 +1614,7 @@ WITH Funnel AS (
|
||||
ta.total_answers,
|
||||
CASE
|
||||
WHEN ta.total_answers = 0 THEN NULL
|
||||
ELSE COUNT(*)::FLOAT / NULLIF(ta.total_answers, 0)
|
||||
ELSE CAST(COUNT(*)::FLOAT / NULLIF(ta.total_answers, 0) AS INTEGER)
|
||||
END AS percentage
|
||||
FROM
|
||||
answer a
|
||||
@ -1639,7 +1639,7 @@ WITH Funnel AS (
|
||||
a.content AS answer_content,
|
||||
CASE
|
||||
WHEN q.total_answers = 0 THEN NULL
|
||||
ELSE COUNT(*)::FLOAT / NULLIF(q.total_answers, 0)
|
||||
ELSE CAST(COUNT(*)::FLOAT / NULLIF(q.total_answers, 0) AS INTEGER)
|
||||
END AS percentage
|
||||
FROM
|
||||
answer a
|
||||
@ -1693,10 +1693,10 @@ type QuestionsStatisticsRow struct {
|
||||
CountTStartWithTQuestion int64 `db:"count_t_start_with_t_question" json:"count_t_start_with_t_question"`
|
||||
CountTResult int64 `db:"count_t_result" json:"count_t_result"`
|
||||
ResultsTitle string `db:"results_title" json:"results_title"`
|
||||
ResultsPercentage interface{} `db:"results_percentage" json:"results_percentage"`
|
||||
ResultsPercentage int32 `db:"results_percentage" json:"results_percentage"`
|
||||
QuestionsTitle string `db:"questions_title" json:"questions_title"`
|
||||
AnswerContent sql.NullString `db:"answer_content" json:"answer_content"`
|
||||
QuestionsPercentage interface{} `db:"questions_percentage" json:"questions_percentage"`
|
||||
QuestionsPercentage int32 `db:"questions_percentage" json:"questions_percentage"`
|
||||
}
|
||||
|
||||
func (q *Queries) QuestionsStatistics(ctx context.Context, arg QuestionsStatisticsParams) ([]QuestionsStatisticsRow, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user