-- name: CreateResultLog :one INSERT INTO result_log ( status_not_finished_count, status_not_finished_bets, status_to_be_fixed_count, status_to_be_fixed_bets, status_postponed_count, status_postponed_bets, status_ended_count, status_ended_bets, status_removed_count, status_removed_bets, removed_count ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING *; -- name: GetAllResultLog :many SELECT * FROM result_log WHERE ( created_at < sqlc.narg('created_before') OR sqlc.narg('created_before') IS NULL ) AND ( created_at > sqlc.narg('created_after') OR sqlc.narg('created_after') IS NULL ) ORDER BY created_at DESC;