Skip to content

Commit

Permalink
fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
TeoCalvo authored and TeoCalvo committed Nov 25, 2023
1 parent ebc3d38 commit 1daba84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/02.bronze/dota/etl/matches_players.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
WITH tb_explode AS (

SELECT explode(players) as players
SELECT players.*
FROM {table}
LATERAL VIEW explode(players) FROM {table} AS players

)

SELECT players.*
SELECT *
FROM tb_explode
QUALIFY row_number() OVER (PARTITION BY account_id, match_id ORDER BY start_time DESC) = 1

0 comments on commit 1daba84

Please sign in to comment.