The following query works in SQL Management Studio but doesn't work from within the Node driver, pointing to an Azure database.
The goal is to project the properties "player1Nickname" and "player2Nickname" onto the rows returned from the "games" table. The values for the properties are keyed off of the "player1"/"player2" properties against a "players" table.
select games.*, player1.nickname as player1Nickname, player2.nickname as player2Nickname from games
inner join players as player1 on player1.userId = games.player1
inner join players as player2 on player2.userId = games.player2