We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Source: Stackoverflow.com
s it possible to have non-aggregate condition on groups? For example we have:
Table1(firstName, lastName, gender)
And we group by firstName and then by lastName, but we want only the groups having at least 5 males in it.
SELECT * FROM people GROUP BY FirstName, LastName HAVING SUM(CASE WHEN Gender = "M" THEN 1 ELSE 0 END) >= 5
See the working Alasql example in jsFiddle
Quick links
AlaSQL wiki frontpage
About AlaSQL
Install AlaSQL
Get started with AlaSQL