You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't reference table name in subquery if grouped #1106
Hi,
This issue is old (but always open), and I had recently a similar problem than @macrat.
I found a solution which worked in my case, so I think it should work for @macrat.
Here is the technique I would use :
first I would replace the 2 occurrences of the table "test" by "?"
SELECT team, name, (
SELECTSUM(score)
FROM ? AS i
WHEREi.team=o.team
) AS group_score
FROM ? AS o
second : for the execution of the request, I would pass the same dataset twice
alasql(query, [dataset, dataset]);
Activity
gregja commentedon Apr 23, 2021
Hi,
This issue is old (but always open), and I had recently a similar problem than @macrat.
I found a solution which worked in my case, so I think it should work for @macrat.
Here is the technique I would use :
alasql(query, [dataset, dataset]);
I hope it will help.
Best regards
mathiasrw commentedon Aug 20, 2026
A fix was released as part of v4.18.0