Skip to content

Commit

Permalink
doc: fix typo in predicates.md (#3970)
Browse files Browse the repository at this point in the history
should be owner_id
  • Loading branch information
max-yue committed Apr 30, 2024
1 parent 3af7585 commit f67b189
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/md/predicates.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ The above code will produce the following SQL query:

```sql
-- `IN` version.
SELECT DISTINCT `users`.`id`, `users`.`age`, `users`.`name` FROM `users` WHERE `users`.`id` IN (SELECT `cars`.`id` FROM `cars` WHERE `cars`.`model` = 'Tesla')
SELECT DISTINCT `users`.`id`, `users`.`age`, `users`.`name` FROM `users` WHERE `users`.`id` IN (SELECT `cars`.`owner_id` FROM `cars` WHERE `cars`.`model` = 'Tesla')

-- `JOIN` version.
SELECT DISTINCT `users`.`id`, `users`.`age`, `users`.`name` FROM `users` JOIN `cars` ON `users`.`id` = `cars`.`owner_id` WHERE `cars`.`model` = 'Tesla'
Expand Down

0 comments on commit f67b189

Please sign in to comment.