Skip to content

calculations.inplay_2_score

Derives the score-winner side at each minute ('home'/'draw'/'away'/NULL) by parsing short_score. Built directly on inplay_1_by_minute.

flowchart LR
i1[/calculations.inplay_1_by_minute/] --> me[/calculations.inplay_2_score/]
me --> mart[/mart.inplay/]
click i1 "/calculations/inplay_1_by_minute/" "Open"
click mart "/mart/inplay/" "Open"
ColumnDescriptionFormula
event_idBet365 event identifier.passthrough
event_dateEvent date.passthrough
event_partition_keyClickHouse partition key.passthrough
minute_idMatch minute.passthrough
score_winnerSide currently leading at this minute.case when short_score IS NULL OR short_score IN ('','-') OR NOT match(short_score, '^[0-9]+-[0-9]+$') then NULL when home > away then 'home' when home = away then 'draw' when home < away then 'away' end (home/away parsed via substring + position(short_score, '-'))