From 70b951215d20cac7f052916131c0a5d5617b9acd Mon Sep 17 00:00:00 2001 From: TeoCalvo Date: Thu, 24 Aug 2023 17:47:28 +0000 Subject: [PATCH] Fix: window function with descending order --- src/03.silver/dota/etl/team_last_seen.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/03.silver/dota/etl/team_last_seen.sql b/src/03.silver/dota/etl/team_last_seen.sql index d671acc..d736bb4 100644 --- a/src/03.silver/dota/etl/team_last_seen.sql +++ b/src/03.silver/dota/etl/team_last_seen.sql @@ -5,4 +5,4 @@ SELECT idTeam, FROM silver.dota.matches_teams -QUALIFY ROW_NUMBER() OVER (PARTITION BY descTeamName ORDER BY dtMatch) = 1 \ No newline at end of file +QUALIFY ROW_NUMBER() OVER (PARTITION BY descTeamName ORDER BY dtMatch DESC) = 1 \ No newline at end of file