Search Postgresql Archives

Re: Help with join syntax sought

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James B. Byrne wrote:
On Tue, May 19, 2009 16:41, Andy Colson wrote:

If your query above is getting you mostly what you want, just use it
as a derived table.


I lack the experience to understand what this means.

If, as you suggest, I use a subquery as the expression to the main
SELECT and for it I use the syntax that returns every distinct
combination of base, quote, timestamp, and type, then what?

Unless I am missing something then I still have too many rows for
those currencies with more than one type.


I was not offering a specific answer, just another tool you could use to massage the data more. What I'm saying is, with that first query you got the data into a new format.... Think of that result set as a table itself.

As if you had done:

create table tmp (lots of field);
insert into tmp select (that big query you first posted)

now can you select from tmp to get your answer? Once again, I may be leading you down the wrong path, and as I said before I don't know your data/layouts, and I didn't study your sql very much.

-Andy

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux