Open GoogleCodeExporter opened 8 years ago
May be a SQLite issue, some of the aggregate functions were changed after 3.7
Can you supply your schema and some sample data please
Original comment by noah.hart@gmail.com
on 29 Jun 2012 at 10:20
[deleted comment]
DB without data:
http://sdrv.ms/N3O5qV
I don't have any tools to generate sample data.
Original comment by shakirov...@gmail.com
on 2 Jul 2012 at 10:00
I am having the same issue. COUNT is not working properly if it is inside a Sub
query and the sub query uses outer table column to filter data
select (select count(*) from Cars where Cars.TypeID = CarTypes.TypeID) AS
CarTypeCount
from CarTypes
Original comment by dilhan.j...@gmail.com
on 27 Nov 2014 at 11:00
[deleted comment]
[deleted comment]
I found a Solutions for this issue,
just use SUM(1) instead of COUNT(*) in your query
Because sum(1) is exactly the same as count(*)
to work this properly Use following complete query,
IFNULL(SUM(1),0) AS MY_COUNT
Original comment by dilhan.j...@gmail.com
on 28 Nov 2014 at 12:34
Original issue reported on code.google.com by
shakirov...@gmail.com
on 13 Apr 2012 at 1:13