Reputation: 825
I am having a table like this.
I want to write a query in sqlite in flutter to get all the records where id are different. For above table output should be:-
How should I work this out?
Upvotes: 2
Views: 568
Reputation: 1828
Just use the word "distinct on columnName" after the select statement like this:
select distinct on id *
from table
For reference and more clarity check this out.
Upvotes: 1