sorarebuddy/model/sql/game_player_score.sql

129 lines
3.8 KiB
MySQL
Raw Normal View History

2024-03-23 19:46:17 +00:00
-- name: CreateOrUpdateGamePlayerScores :batchexec
INSERT INTO game_player_scores(
game_id,
player_slug,
score,
decisive_score,
all_around_score,
minutes_played,
game_started,
formation_place,
live,
on_game_sheet,
reviewed,
goal,
assist,
penalty_won,
clearance_off_line,
last_man_tackle,
penalty_save,
own_goal,
red_card,
error_lead_to_goal,
penalty_conceded,
yellow_card,
fouls,
fouled,
clean_sheet,
double_double,
triple_double,
triple_triple,
error_lead_to_shot,
saves,
saved_shot_from_inside_box,
good_high_claim,
punches,
diving_save,
diving_catch,
cross_not_claimed,
goalkeeper_smother,
six_second_violation,
keeper_sweeper,
goals_conceded,
effective_clearance,
won_tackle,
blocked_cross,
block,
possession_lost,
possession_won,
duel_lost,
duel_won,
interception,
accurate_pass,
accurate_final_third_pass,
accurate_long_ball,
long_pass_into_opposition,
missed_pass,
shot_on_target,
won_contest,
big_chance_created,
attempted_assist,
penalty_area_entries,
penalty_kick_missed,
big_chance_missed)
VALUES(
$1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,
$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,
$61)
ON CONFLICT (game_id, player_slug) DO UPDATE
SET score = EXCLUDED.score,
decisive_score = EXCLUDED.decisive_score,
all_around_score = EXCLUDED.all_around_score,
minutes_played = EXCLUDED.minutes_played,
game_started = EXCLUDED.game_started,
formation_place = EXCLUDED.formation_place,
live = EXCLUDED.live,
on_game_sheet = EXCLUDED.on_game_sheet,
reviewed = EXCLUDED.reviewed,
goal = EXCLUDED.goal,
assist = EXCLUDED.assist,
penalty_won = EXCLUDED.penalty_won,
clearance_off_line = EXCLUDED.clearance_off_line,
last_man_tackle = EXCLUDED.last_man_tackle,
penalty_save = EXCLUDED.penalty_save,
own_goal = EXCLUDED.own_goal,
red_card = EXCLUDED.red_card,
error_lead_to_goal = EXCLUDED.error_lead_to_goal,
penalty_conceded = EXCLUDED.penalty_conceded,
yellow_card = EXCLUDED.yellow_card,
fouls = EXCLUDED.fouls,
fouled = EXCLUDED.fouled,
clean_sheet = EXCLUDED.clean_sheet,
double_double = EXCLUDED.double_double,
triple_double = EXCLUDED.triple_double,
triple_triple = EXCLUDED.triple_triple,
error_lead_to_shot = EXCLUDED.error_lead_to_shot,
saves = EXCLUDED.saves,
saved_shot_from_inside_box = EXCLUDED.saved_shot_from_inside_box,
good_high_claim = EXCLUDED.good_high_claim,
punches = EXCLUDED.punches,
diving_save = EXCLUDED.diving_save,
diving_catch = EXCLUDED.diving_catch,
cross_not_claimed = EXCLUDED.cross_not_claimed,
goalkeeper_smother = EXCLUDED.goalkeeper_smother,
six_second_violation = EXCLUDED.six_second_violation,
keeper_sweeper = EXCLUDED.keeper_sweeper,
goals_conceded = EXCLUDED.goals_conceded,
effective_clearance = EXCLUDED.effective_clearance,
won_tackle = EXCLUDED.won_tackle,
blocked_cross = EXCLUDED.blocked_cross,
block = EXCLUDED.block,
possession_lost = EXCLUDED.possession_lost,
possession_won = EXCLUDED.possession_won,
duel_lost = EXCLUDED.duel_lost,
duel_won = EXCLUDED.duel_won,
interception = EXCLUDED.interception,
accurate_pass = EXCLUDED.accurate_pass,
accurate_final_third_pass = EXCLUDED.accurate_final_third_pass,
accurate_long_ball = EXCLUDED.accurate_long_ball,
long_pass_into_opposition = EXCLUDED.long_pass_into_opposition,
missed_pass = EXCLUDED.missed_pass,
shot_on_target = EXCLUDED.shot_on_target,
won_contest = EXCLUDED.won_contest,
big_chance_created = EXCLUDED.big_chance_created,
attempted_assist = EXCLUDED.attempted_assist,
penalty_area_entries = EXCLUDED.penalty_area_entries,
penalty_kick_missed = EXCLUDED.penalty_kick_missed,
big_chance_missed = EXCLUDED.big_chance_missed;