I have a very large table.
Each row has a uniqueId and an itemId. I want to delete all items that are priced below a given average. I figured something like this should work, but it doesnt:
DELETE FROM items GROUP BY itemId HAVING avg(price) < ?
SQLite complains:
near “GROUP”: syntax error
Any idea what might be going on?
1 Answer