Hello,
Let’s imagine I’ve got something like the follow:
player::1
SELECT player.name, player.age FROM default player
WHERE _type = "player"
This should work. But let’s say I have a document named player::1::is_national_player (its contents doesn’t matter).
Therefore I would like to use the first query, and for each player, I would like to know if he would have that document, returning a boolean.
I’ve tried something like the following, but it doesn’t seem to work. Am I missing something or how can I achieve such result without a separate query?
SELECT player.name, player.age, TOBOOLEAN(is_national_player) AS national_player FROM default player
LEFT JOIN `default` is_national_player ON KEYS "player_" || player.id || "::is_national_player"
WHERE _type = "player"
I’ve tried with and without TOBOOLEAN, and with and without specifying a specific field.
Any ideas?