Back to feed

Project docs

Ski Jumping Statistics

PostgreSQL analysis of men's Ski Jumping World Cup results, supported by a Python data collection pipeline.

Largest Winning Margins

The World Cup victories with the greatest points difference between the winner and the runner-up.

Rules

  • The winner and runner-up are selected from each competition’s final results.
  • The winning margin is the winner’s total points minus the runner-up’s total points.
  • Competitions are ranked from the largest winning margin downward.

The calculation uses final positions and total points from the competition_results materialized view.

Calculating each margin

create view advantages_over_second_player
as
with top_results as (
	select *,
		row_number() over (partition by race_id order by total_points desc) as rn
	from competition_results
	where pos < 3
)
select
	c.race_id,
	first_place.jumper_id as first_place_jumper_id,
	second_place.jumper_id as second_place_jumper_id,
	(first_place.total_points - second_place.total_points)::decimal(10, 2) as advantage
from competitions c
join top_results as first_place on
	first_place.race_id = c.race_id and first_place.rn = 1
join top_results as second_place on
	second_place.race_id = c.race_id and second_place.rn = 2;

Raw view presentation

First 20 raw advantages_over_second_player view results20 rows
race_idfirst_place_jumper_idsecond_place_jumper_idadvantage
4916122812.80
491867680.60
491972674.80
492267722.40
492488670.10
4925676511.60
492765674.20
492965677.60
4931656814.50
493365883.20
493577682.50
4945111723.60
494768670.80
494881652.00
4952657327.70
4954656617.00
495776775.40
495965813.70
4961656615.50
500164652.30

Top 10 winning margins

select
	j1.jumper_name as first_place,
	j2.jumper_name as second_place,
	aosp.advantage as winning_margin,
	to_char(c.competition_started, 'Mon DD YYYY') as date,
	c.hill_city || ' HS' || c.hill_size as hill
from advantages_over_second_player aosp
join competitions c using (race_id)
join jumpers j1 on aosp.first_place_jumper_id = j1.jumper_id
join jumpers j2 on aosp.second_place_jumper_id = j2.jumper_id
order by aosp.advantage desc
limit 10;

Results

Largest winning margins10 rows
first_placesecond_placewinning_margindatehill
HUBER DanielPREVC Domen43.40Mar 24 2024Planica HS240
PREVC DomenNIKAIDO Ren31.70Feb 01 2026Willingen HS147
FORFANG Johann AndreKOBAYASHI Ryoyu31.00Feb 03 2024Willingen HS147
STOCH KamilEISENBICHLER Markus28.20Mar 04 2018Lahti HS130
STOCH KamilKUBACKI Dawid27.70Mar 13 2018Lillehammer HS140
KOBAYASHI RyoyuKUBACKI Dawid26.50Jan 12 2019Val di Fiemme HS135
KUBACKI DawidLANISEK Anze25.70Dec 11 2022Titisee Neustadt HS142
PREVC DomenKRAFT Stefan25.50Dec 13 2025Klingenthal HS140
PREVC DomenEMBACHER Stephan24.80Mar 01 2026Kulm HS235
KRAFT StefanPEIER Killian23.00Dec 08 2019Nizhny Tagil HS134