sqlitis icon indicating copy to clipboard operation
sqlitis copied to clipboard

Add support for aggregate functions (COUNT, GROUP BY, HAVING)

Open FireCulex opened this issue 4 years ago • 3 comments

$ sqlitis "select count('typeID'),character_id from skills  where active>0 and ('typeID'=3337 or 'typeID'=3336 or 'typeID'=12212) group by character_id having count('typeID') =3"
ERROR: Failed to convert SQL: select count('typeID'),character_id from skills  where active>0 and ('typeID'=3337 or 'typeID'=3336 or 'typeID'=12212) group by character_id having count('typeID') =3
[BUG] Failed to convert 'typeID' to model

FireCulex avatar Oct 18 '20 03:10 FireCulex

Yep, not all syntax is supported yet: https://github.com/pglass/sqlitis#sql-support-checklist

pglass avatar Oct 18 '20 03:10 pglass

Also I was using double quotes and the message is different when using single quotes?

FireCulex avatar Oct 18 '20 03:10 FireCulex

Can you be more specific about the quotations?

Do you mean this, (where all quotes are single quotes)?

$ sqlitis 'select count('typeID'),character_id from skills  where active>0 and ('typeID'=3337 or 'typeID'=3336 or 'typeID'=12212) group by character_id having count('typeID') =3'

pglass avatar Oct 18 '20 03:10 pglass