Re: R: R: How to check if 2 series of data are equal

From: Octavio Alvarez <alvarezp(at)alvarezp(dot)ods(dot)org>
To: Paolo Saudin <paolo(at)ecometer(dot)it>
Cc: Adrian Klaver <aklaver(at)comcast(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: R: R: How to check if 2 series of data are equal
Date: 2009-02-13 04:46:20
Message-ID: 1234500380.23861.4.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2009-02-12 at 14:21 -0800, Adrian Klaver wrote:
> On Thursday 12 February 2009 11:37:37 am Paolo Saudin wrote:
>

>
> SELECT fulldate,sensor
> FROM (SELECT fulldate,sensor,count(sensor)
> FROM (SELECT 1 AS station, fulldate, meanvalue AS sensor FROM table1
> UNION
> SELECT 2, fulldate, meanvalue FROM table2 ORDER BY
> fulldate,sensor) AS x
> GROUP BY fulldate,sensor) AS y
> WHERE y.count>1;
>
>
> and got-
>
> fulldate | sensor
> ---------------------+--------
> 2009-01-01 00:00:00 | 12.3
> 2009-01-01 02:00:00 | 82.1
> 2009-01-01 03:00:00 | 79.8
> 2009-01-01 04:00:00 | 77.2

You might want to do a UNION with all your tables to add a field to
identify the table, and use min() and max() to show the offending
tables.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2009-02-13 06:55:04 Re: TSearch queries with multiple languages
Previous Message Craig Ringer 2009-02-13 03:13:05 Re: audit table