I have a query which relies on avg() using sqlite-jdbc to connect to a sqlite database. However when my query runs I get an answer of 0.0 for the average, but when I run the same query elsewhere (portable database viewer) I get the expected (non-zero) value. Why?
Column being averaged is a list of integers.
SELECT COUNT(col) as count, AVG(col) as average FROM table WHERE <many-clauses-here>
The count returns correctly.
Values being averaged: "54", "56", "66", "53"
The file format is sqlite, but the way it is styled is in the spec given by ddf spec though this should not be relevant