mardi 24 février 2015

android sqlite group by with more than one column not working

In android i am having a table which stores lat, long value and corresponding id is associated with every row. when i am using the query





SELECT latitude, longitude, COUNT(*) count FROM tasks GROUP BY latitude, longitude HAVING count > 1


it is giving me group by latitude only and not longitude. how can i achieve this? i want to get the count of tasks with unique lat long values only. is there any way to achieve this using android sqlite?


Aucun commentaire:

Enregistrer un commentaire