From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of David G. JohnstonSent: Thursday, 14 July, 2016 08:23To: Nick BabadzhanianCc: Tim Smith; pgsql-generalSubject: Re: [GENERAL] Merging timeseries in postgres On Thu, Jul 14, 2016 at 8:18 AM, Nick Babadzhanian <nb@cobra.ru> wrote:Whats exactly is wrong with the following query? select dx date, nx, nx1 from test t join test1 t1 on t.dx=t1.dx1 ; Please don't top-post. test t join test1 t1 -- this is the default inner join, your query returns no records for the given data. David J.Look at the above documentation (7.2.1.1) on full joinhttps://www.postgresql.org/docs/9.3/static/queries-table-expressions.html select coalesce(dx,dx1)as dt, n, nx1from test full join test1 on dx=dx1; Daniel
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of David G. JohnstonSent: Thursday, 14 July, 2016 08:23To: Nick BabadzhanianCc: Tim Smith; pgsql-generalSubject: Re: [GENERAL] Merging timeseries in postgres
On Thu, Jul 14, 2016 at 8:18 AM, Nick Babadzhanian <nb@cobra.ru> wrote:
Whats exactly is wrong with the following query? select dx date, nx, nx1 from test t join test1 t1 on t.dx=t1.dx1 ;
Please don't top-post.
test t join test1 t1 -- this is the default inner join, your query returns no records for the given data.
David J.
Look at the above documentation (7.2.1.1) on full join
https://www.postgresql.org/docs/9.3/static/queries-table-expressions.html
select coalesce(dx,dx1)as dt, n, nx1
from test full join test1 on dx=dx1;
Daniel
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных