If it does not work on the sqlite3 command line then it is a problem with SQL and SQLite. There is very little we can do from a Perl perspective.
As your SQL statement is quite long, try reducing the columns and aggregates.
The error message says that you try to GROUP BY something that is an aggregate function, which SQLite does not allow (and which does not make much sense to me either). Consider moving your subselects into views maybe to disambiguate the aggregates etc.
In reply to Re^3: Error in query with DBD-SQLite-1.37 - Aggregate functions are not allowed in the GROUP BY clause.
by Corion
in thread Error in query with DBD-SQLite-1.37 - Aggregate functions are not allowed in the GROUP BY clause.
by saumitra121
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |