Skip to content Skip to sidebar Skip to footer

Get A Count Of The Number Of Times Distinct Entries Occur In Database Query (android)

I have a bit of a tricky problem. My app inputs user data into the SQLite database and I have managed to write queries to get the data back out. This includes a query that gets a

Solution 1:

Did u try adding COUNT(*) function to your columns list?

see this: count columns group by

Solution 2:

The query that you want is:

selectcount(*) as cnt, cola, colb, colc
from YourTable
groupby cola, colb, colc

I'm not sure how to put this into your code. You don't seem to have a query that returns the combinations in the snippet of code that you provided.

Solution 3:

Try this.

Get all unique values and temporarily store them somewhere and just loop and do another query to try and find those values again and every time u find one, update some counter.

Post a Comment for "Get A Count Of The Number Of Times Distinct Entries Occur In Database Query (android)"