-Original Message-
From: sqlite-users On Behalf
Of R Smith
Sent: Saturday, June 9, 2018 6:04 PM
To: sqlite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] Selecting with distinct on across two columns
> DISTINCT is nothing more than a GROUP BY for the entire SELECT list.
Brilli
On 2018/06/10 1:41 AM, Joseph L. Casale wrote:
I have a table where I need to select all distinct records from two columns and
include a third that varies. It is possible that for multiple records where the
first
and second columns are equivalent, the third varies so it cannot be used in the
SQLite allows you to simply do:
select colA, colB, colC from tab group by colA, colB;
You can also do:
select colA, colB, min(colC) from tab group by colA, colB;
or:
select colA, colB, max(colC) from tab group by colA, colB;
2018-06-10 1:41 GMT+02:00, Joseph L. Casale :
> I have a
I have a table where I need to select all distinct records from two columns and
include a third that varies. It is possible that for multiple records where the
first
and second columns are equivalent, the third varies so it cannot be used in the
distinct clause. In this case, I want to select the
4 matches
Mail list logo