7 lines
611 B
TypeScript
7 lines
611 B
TypeScript
/**
|
|
* SQL fragments for cross-game user bet statistics.
|
|
* Source: `user_game_bet_stats` view (one row per user per game).
|
|
*/
|
|
/** Lateral subquery body — aggregates all games for the outer `users u` row. */
|
|
export declare const USER_BET_STATS_LATERAL_BODY = "\n SELECT COALESCE(SUM(bet_count), 0)::int AS prediction_count,\n COALESCE(SUM(total_stake_raw), 0)::bigint AS total_stake_raw,\n COALESCE(SUM(total_payout_raw), 0)::bigint AS total_payout_raw,\n MAX(last_bet_at) AS last_bet_at\n FROM user_game_bet_stats\n WHERE user_id = u.id";
|
|
//# sourceMappingURL=userGameBetStatsRepository.d.ts.map
|