Re: [SQL] grouping subsets

2010-07-30 Thread Joshua Tolley
On Thu, Jul 22, 2010 at 11:31:23AM +, Tim Landscheidt wrote: > Richard Huxton wrote: > > >>> What I want to get is the values grouped by "subset", where a subset is a > >>> set of rows with identical column until the colum changes. > >>> Is there a way to get > > >>> | 2 | B | > >>> | 4 | C

Re: [SQL] grouping subsets

2010-07-30 Thread Oliveiros d'Azevedo Cristina
I See. And the analysis you need to do, the sum of the rows with the same keys (until they change) will have to be done over all table? Or just over some predefined interval ? Best, Oliveiros - Original Message - From: "Rainer Stengele" Newsgroups: gmane.comp.db.postgresql.sql To: "

Re: [SQL] grouping subsets

2010-07-30 Thread Rainer Stengele
the table may include up to maybe 30 entries per day, average maybe 10-15 After a year this makes about 10.000 entries - maximum, average about 5000 entries. For the problem described I have to use a Microsoft SQL database and would like to use pure SQL. As I use postgres on my Linux servers I f