Live demo · click around
definitions/fct_player_transfers.sqlx
1config {
2 type: "table",
3 description: "The most expensive Manchester United signing of each season",
4 tags: ["transfers"],
5 columns: {
6 transfer_date: "Date the player moved from one club to the other",
7 ...docs.columnDescriptions
8 }
9}
10
11WITH signings AS (
12 SELECT *
13 FROM ${ref("int_signings")}football-analytics-dev.analytics.int_signingsKind: viewLocation: europe-west2Description: Every transfer with the player's position and the buying club's competitionLast modified: Oct 11, 2026, 10:06:49 AM UTCColumnTypecountry_of_citizenshipSTRINGfrom_club_idINTEGERfrom_club_nameSTRINGmarket_value_in_eurFLOATplayer_idINTEGERplayer_nameSTRINGpositionSTRINGto_club_competitionSTRINGto_club_idINTEGERto_club_nameSTRINGtransfer_dateDATEtransfer_feeFLOATtransfer_seasonSTRING
14 WHERE to_club_id = ${params.MANCHESTER_UNITED_CLUB_ID}
15)
16
17SELECT *
18FROM signings
19QUALIFY
20 ROW_NUMBER() OVER (
21 PARTITION BY transfer_season
22 ORDER BY transfer_fee DESC
23 ) = 1
24ORDER BY transfer_date DESC
The compiled query panel: the compiled SQL of the model, what a dry run says it will scan and cost, and the buttons to run and preview it