-
Notifications
You must be signed in to change notification settings - Fork 689
Closed
Description
Consider this simple query:
alasql(`
SELECT
a.outcome,
a.n, a.n/b.n as p
FROM (
SELECT
result as outcome,
COUNT(*) AS n
FROM ?
GROUP BY result
) a
CROSS JOIN (
SELECT COUNT(*) as n FROM ?
) b
`, [x, x])
It returns this kind of object: [{n: 123}], so it seems to be returing just the result of the subquery SELECT COUNT(*) as n FROM ? instead of the whole query, how is that possible?
It consistently happens as well with other types of JOINs