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.
Lineage
Section titled “Lineage”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"
Columns
Section titled “Columns”| Column | Description | Formula |
|---|---|---|
event_id | Bet365 event identifier. | passthrough |
event_date | Event date. | passthrough |
event_partition_key | ClickHouse partition key. | passthrough |
minute_id | Match minute. | passthrough |
score_winner | Side 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, '-')) |