Re: [sqlite] Update and GROUP BY

2013-11-06 Thread James K. Lowden
On Mon, 4 Nov 2013 13:01:37 +0100 Gert Van Assche wrote: > Thanks James -- the select query is something I could do, but the > update one I could not get that one right. > I was considering to create a new table based on the select query, > but since the real data set is

Re: [sqlite] Update and GROUP BY

2013-11-04 Thread Gert Van Assche
Thanks James -- the select query is something I could do, but the update one I could not get that one right. I was considering to create a new table based on the select query, but since the real data set is millions of records, an update was the best solution. As always, thanks for your help.

Re: [sqlite] Update and GROUP BY

2013-11-03 Thread James K. Lowden
On Sat, 2 Nov 2013 18:06:30 +0100 Gert Van Assche wrote: > CREATE TABLE T (N, V, G); > INSERT INTO T VALUES('a', 1, 'x'); > INSERT INTO T VALUES('b', 3, 'x'); > INSERT INTO T VALUES('c', null, 'x'); > INSERT INTO T VALUES('d', 80, 'y'); > INSERT INTO T VALUES('e', null,

Re: [sqlite] Update and GROUP BY

2013-11-02 Thread Jim Callahan
Good question Gert. Good solution, Igor and I like Keith's formatting. I thought the list might be interested in some of the statistical issues involved in determining if this method of replacing null values is an appropriate method for your data analysis and alternatives that are available. The

Re: [sqlite] Update and GROUP BY

2013-11-02 Thread Gert Van Assche
un...@sqlite.org [mailto:sqlite-users- > >boun...@sqlite.org] On Behalf Of Gert Van Assche > >Sent: Saturday, 2 November, 2013 11:07 > >To: sqlite-users > >Subject: [sqlite] Update and GROUP BY > > > >All, I have this table: > > > >DROP TABLE T; > &

Re: [sqlite] Update and GROUP BY

2013-11-02 Thread Gert Van Assche
Igor, that is exactly what I need. I also understand how it is done now. Thanks! gert 2013/11/2 Igor Tandetnik > On 11/2/2013 1:06 PM, Gert Van Assche wrote: > >> All, I have this table: >> >> DROP TABLE T; >> CREATE TABLE T (N, V, G); >> INSERT INTO T VALUES('a', 1,

Re: [sqlite] Update and GROUP BY

2013-11-02 Thread Keith Medcalf
to update the value of V in rows where V IS NULL ... >-Original Message- >From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >boun...@sqlite.org] On Behalf Of Gert Van Assche >Sent: Saturday, 2 November, 2013 11:07 >To: sqlite-users >Subject: [sqlite] Update and GROUP

Re: [sqlite] Update and GROUP BY

2013-11-02 Thread Igor Tandetnik
On 11/2/2013 1:06 PM, Gert Van Assche wrote: All, I have this table: DROP TABLE T; CREATE TABLE T (N, V, G); INSERT INTO T VALUES('a', 1, 'x'); INSERT INTO T VALUES('b', 3, 'x'); INSERT INTO T VALUES('c', null, 'x'); INSERT INTO T VALUES('d', 80, 'y'); INSERT INTO T VALUES('e', null, 'y');

[sqlite] Update and GROUP BY

2013-11-02 Thread Gert Van Assche
All, I have this table: DROP TABLE T; CREATE TABLE T (N, V, G); INSERT INTO T VALUES('a', 1, 'x'); INSERT INTO T VALUES('b', 3, 'x'); INSERT INTO T VALUES('c', null, 'x'); INSERT INTO T VALUES('d', 80, 'y'); INSERT INTO T VALUES('e', null, 'y'); INSERT INTO T VALUES('f', 60, 'y'); INSERT INTO T