sql
sql copied to clipboard
Subquery seem to fail though accepted by sqlite3.
Hi, I think this is a bug, but I'm not terribly familiar with this library and sql derivative.
This sql query:
SELECT
count(),
'user without role',
id
FROM
user as u
WHERE
u.id
NOT IN (
SELECT user_id
FROM mm_user_access_role
)
;
But produces this error:
err: 11:3: expected expression, found 'SELECT'
Here is a different example, but I believe it has the same root cause
SELECT column1,
CASE
WHEN column2 > 50
THEN (SELECT column3
FROM bokume
WHERE id = fokume.id)
ELSE 'value'
END
FROM fokume;