No its giving the same error when I ran it on SQLite-3.7.11 command line. Please check my updated answer with new findings and guide me with troubleshooting this issue. | [reply] |
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.
| [reply] [d/l] |
Can u please help me in troubleshooting why DBD-SQlite is unable to detect the the current SQLITE version?
The strange thing is that the same query with GROUP BY is running fine with DBI but not on command line.
| [reply] |