I have a TABLE like this
unixdatetime INTEGER PRIMARY KEY, UserId TEXT, Latitude TEXT
1505144748 ABC123 51.6N
1505309523 ABC123 51.6N
1505320731 BCD234 51.6N
1505378502 BCD234 51.6N
1507382309 BCD234 51.6N
I need to get a one Latitude result for each DISTINCT UserID, so my result would be [(51.691N), (51.691N)]
Im trying
c.execute('select DISTINCT Latitude from TABLE where UserID in (select DISTINCT UserID from TABLE)').fetchall()
But that only gives me 1 result, I understand thats because Im asking for DISTINCT Latitude, I just dont know how to ask SQLite for what Im looking for. max(Latitude) does the same.