Re: [SQL] Merge overlapping time-periods

2011-06-15 Thread Oliveiros d'Azevedo Cristina
Hello again, Marcel. I tried this and it seems to work on the example you provided, iif my understanding is correct and you want the ID=2 to have just one record on final output. That makes sense to me because 2 2000-01-15 2000-03-31 2 2000-04-01 2000-04-15 are in direct sequence (I

Re: [SQL] Merge overlapping time-periods

2011-06-15 Thread Oliveiros d'Azevedo Cristina
Howdy, Marcel, In the example output you provided the ID = 2 should have just one record...Ain't I right? Best, Oliveiros - Original Message - From: Jira, Marcel To: 'pgsql-sql@postgresql.org' Sent: Wednesday, June 15, 2011 4:23 PM Subject: [SQL] Merge overlapping time-perio

Re: [SQL] Merge overlapping time-periods

2011-06-15 Thread F. BROUARD / SQLpro
I write a paper on this topic comparing queries for PG, SQL Server and MySQL. Can you read french ? http://blog.developpez.com/sqlpro/p9821/langage-sql-norme/agregation-d-intervalles-en-sql-1/ The worst query is the RECURSIVE one ! A + Le 15/06/2011 17:23, Jira, Marcel a écrit : Hi! Althou