Try alias the count: SELECT columnname,count(columnname) as `Total` + FROM tablename + WHERE othercolumn=something +
GROUP BY columnname + HAVING count(columnname) > n + ORDER BY Total,columnname Dan Goldberg From: Bruce Chitiea Sent: Monday, April 16, 2012 8:13 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Order By, Fail All: Display: Courier New RBX_91(64) 9.1.5.20410 In the following code, everything works but the ORDER BY clause, which returns the error: '-ERROR-Bad ORDER BY clause (2363)' SELECT columnname,count(columnname) + FROM tablename + WHERE othercolumn=something + GROUP BY columnname + HAVING count(columnname) > n + ORDER BY count(columnname),columnname ?? Bruce

