Skip to content

Commit

Permalink
update query for new ingestr
Browse files Browse the repository at this point in the history
  • Loading branch information
albertobruin committed Dec 11, 2024
1 parent ece24e2 commit 4dc0680
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions integration-tests/happy-path/assets/player_summary.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ columns:
WITH game_results AS (
SELECT
CASE
WHEN g.white__result = 'win' THEN g.white__aid
WHEN g.black__result = 'win' THEN g.black__aid
WHEN g.white->>'result' = 'win' THEN g.white->>'@id'
WHEN g.black->>'result' = 'win' THEN g.black->>'@id'
ELSE NULL
END AS winner_aid,
g.white__aid AS white_aid,
g.black__aid AS black_aid
FROM chess_playground.games g
g.white->>'@id' AS white_aid,
g.black->>'@id' AS black_aid
FROM playground.game g
)

SELECT
Expand Down
10 changes: 5 additions & 5 deletions templates/chess/assets/player_summary.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ columns:
WITH game_results AS (
SELECT
CASE
WHEN g.white__result = 'win' THEN g.white__aid
WHEN g.black__result = 'win' THEN g.black__aid
WHEN g.white->>'result' = 'win' THEN g.white->>'@id'
WHEN g.black->>'result' = 'win' THEN g.black->>'@id'
ELSE NULL
END AS winner_aid,
g.white__aid AS white_aid,
g.black__aid AS black_aid
FROM chess_playground.games g
g.white->>'@id' AS white_aid,
g.black->>'@id' AS black_aid
FROM playground.game g
)

SELECT
Expand Down

0 comments on commit 4dc0680

Please sign in to comment.