Skip to content

Commit

Permalink
Fixed nested query
Browse files Browse the repository at this point in the history
  • Loading branch information
richardbizik committed Mar 19, 2022
1 parent fde2c8b commit 4caff5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/endtoend/testdata/join_left/postgresql/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ LIMIT @user_imit;
-- name: GetMayorsOptionalInnerSelect :many
SELECT t1.user_id, t2.full_name
FROM (
SELECT user_id FROM users WHERE users.city_id = $1 LIMIT 1 OFFSET 0
SELECT user_id, city_id FROM users WHERE users.city_id = $1 LIMIT 1 OFFSET 0
) AS t1
LEFT JOIN cities on users.city_id = cities.city_id
LEFT JOIN cities on t1.city_id = cities.city_id
LEFT JOIN (
SELECT mayors.mayor_id, mayors.full_name
FROM mayors where mayors.mayor_id = $2
Expand Down

0 comments on commit 4caff5e

Please sign in to comment.