Sum Booleans and then display only over a certain count

I’ve been banging my head against the wall a while.

I have a table that has “DwgID” (integer) and “Current” (boolean) as part of the table.

What I want to do is filter just the DWGID’s that have more than 1 Current selected.

This code gives me the count correctly:

SELECT “DwgID”, SUM( CASE WHEN “Current” = 1 THEN 1 ELSE 0 END ) “Current” FROM “tblRev” GROUP BY “DwgID”

But if I try to add a criteria where the Current Count is > 1, it fails with a data content could not be loaded.

SELECT “DwgID”, SUM( CASE WHEN “Current” = 1 THEN 1 ELSE 0 END ) “Current” FROM “tblRev” GROUP BY “DwgID” HAVING ( ( SUM( CASE WHEN “Current” = 1 THEN 1 ELSE 0 END ) > 1 ) )

What am I doing wrong?

Discovered that the problem was that I reused names. Revise the second "Current’ to be “numCurrent” and it works.

SELECT "tblRev"."DwgID", SUM( CASE WHEN "Current" = 1 THEN 1 ELSE 0 END ) "numCurrent" FROM "tblRev", "tblMasterDrawingList", "tblFilter" WHERE "tblRev"."DwgID" = "tblMasterDrawingList"."DwgID" AND "tblMasterDrawingList"."ProjNumber" = "tblFilter"."ProjNo" GROUP BY "tblRev"."DwgID" ORDER BY "numCurrent" DESC