show boats which have place in boatshouse
Some checks failed
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
philipp 2024-04-03 08:07:16 +02:00
parent 4e1de0c886
commit 8c8a5c9762

View File

@ -215,12 +215,9 @@ SELECT
b.external b.external
FROM FROM
boat AS b boat AS b
LEFT JOIN
boathouse AS bh ON b.id = bh.boat_id
WHERE WHERE
b.external = false b.external = false
AND b.location_id = (SELECT id FROM location WHERE name = 'Linz') AND b.location_id = (SELECT id FROM location WHERE name = 'Linz')
AND bh.id IS NULL -- This ensures the boat does not have an entry in the boathouse table
ORDER BY ORDER BY
b.name DESC; b.name DESC;
" "