Re: [SQL] How to make this CTE also print rows with 0 as count?

2012-10-06 Thread David Johnston
> -Original Message- > From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql- > ow...@postgresql.org] On Behalf Of air > Sent: Saturday, October 06, 2012 8:48 AM > To: pgsql-sql@postgresql.org > Subject: [SQL] How to make this CTE also print rows with 0 as count? > > I have a CTE based qu

Re: [SQL] Calling the CTE for multiple inputs

2012-10-06 Thread air
Thanks for the info, used a join in order to do that, now I have a "print rows with zcount 0" problem in my new question at http://postgresql.1045698.n5.nabble.com/How-to-make-this-CTE-also-print-rows-with-0-as-count-td5726792.html -- View this message in context: http://postgresql.1045698.n5.n

[SQL] How to make this CTE also print rows with 0 as count?

2012-10-06 Thread air
I have a CTE based query, to which I pass about 2600 4-tuple latitude/longitude values using joins - these latitude longitude 4-tuples have been ID tagged and held in a second table called coordinates. These top left and bottom right latitude / longitude values are passed into the CTE in order to d

Re: [SQL] checking the gaps in intervals

2012-10-06 Thread Andreas Kretschmer
Andreas Kretschmer wrote: > Anton Gavazuk wrote: > > > Hi dear community, > > > > Have probably quite simple task but cannot find the solution, > > > > Imagine the table A with 2 columns start and end, data type is date > > > > start end > > 01 dec. 10 dec > > 11 dec. 13 dec

Re: [SQL] checking the gaps in intervals

2012-10-06 Thread Andreas Kretschmer
Anton Gavazuk wrote: > Hi dear community, > > Have probably quite simple task but cannot find the solution, > > Imagine the table A with 2 columns start and end, data type is date > > start end > 01 dec. 10 dec > 11 dec. 13 dec > 17 dec. 19 dec > . > > If I have inter