Luis Kuper
07/14/2021, 1:42 PMmodel Entry {
id String @id
category String
}
Having the Entry model filled with data:
id: '0', category: 'A'
id: '1', category: 'A'
id: '2', category: 'B'
id: '3', category: 'C'
id: '4', category: 'B'
executing the query for I would like to recieve all queries, where the value of category hasn't been fetched before into the resulting data:
id: '0', category: 'A'
id: '2', category: 'B'
id: '3', category: 'C'
Any ideas?Ryan
07/14/2021, 1:58 PMgroup by
and then fetching the first value from that.
In a raw query, I think partition
should work if you’re using Postgres.Luis Kuper
07/14/2021, 2:01 PMRyan
07/14/2021, 2:02 PMLuis Kuper
07/14/2021, 2:05 PMRyan
07/14/2021, 2:13 PM