Re: [sqlite] unique values from a subset of data based on two fields

2018-06-30 Thread Keith Medcalf
ll but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Paul Sanderson >Sent: Saturday, 30 June, 2018 04:18 >To: SQLite mailing list >Subject:

Re: [sqlite] unique values from a subset of data based on two fields

2018-06-30 Thread Paul Sanderson
to achieve performant results. > > --- > The fact that there's a Highway to Hell but only a Stairway to Heaven says > a lot about anticipated traffic volume. > > > >-----Original Message- > >From: sqlite-users [mailto:sqlite-users- > >boun...@mailinglists

Re: [sqlite] unique values from a subset of data based on two fields

2018-06-29 Thread Keith Medcalf
about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Paul Sanderson >Sent: Friday, 29 June, 2018 09:50 >To: General Discussion of SQLite Database >Subject: [sqlite] unique values from a subs

Re: [sqlite] unique values from a subset of data based on two fields

2018-06-29 Thread Paul Sanderson
0 >>and name not in one_names >> group by status, name >> >> union all >> >> select * from status_one; >> >> >> -----Original Message----- >> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] >> On Behalf

Re: [sqlite] unique values from a subset of data based on two fields

2018-06-29 Thread R Smith
alues from a subset of data based on two fields I have a table Create table names (id int, status int, name text) 1, 1, 'paul' 2, 1,'helen' 3, 0, 'steve' 4, 0, 'steve' 5, 0, 'pete' 6, 0, 'paul' I want a query that returns all

Re: [sqlite] unique values from a subset of data based on two fields

2018-06-29 Thread Paul Sanderson
-Original Message- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of Paul Sanderson > Sent: Friday, June 29, 2018 11:50 AM > To: General Discussion of SQLite Database > Subject: [sqlite] unique values from a subset of data based on two fields &g

Re: [sqlite] unique values from a subset of data based on two fields

2018-06-29 Thread David Raymond
- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Paul Sanderson Sent: Friday, June 29, 2018 11:50 AM To: General Discussion of SQLite Database Subject: [sqlite] unique values from a subset of data based on two fields I have a table Create table names (id int

Re: [sqlite] unique values from a subset of data based on two fields

2018-06-29 Thread Michele Pradella
Select DISTINCT name,id,status from names where status = 1 *Michele Pradella* /R&D Software Engineer / michele.prade...@selea.com Office: +39 0375 889091 --

[sqlite] unique values from a subset of data based on two fields

2018-06-29 Thread Paul Sanderson
I have a table Create table names (id int, status int, name text) 1, 1, 'paul' 2, 1,'helen' 3, 0, 'steve' 4, 0, 'steve' 5, 0, 'pete' 6, 0, 'paul' I want a query that returns all of the records with status = 1 and unique records, based on name, where the status =0 and the name is not in