SQLite: enable sum only with sqlite = sum