From: mallah@trade-india.com
To: ch@rodos.fzk.de
Cc: pgsql-sql@postgresql.org
Cc: mallah@trade-india.com
Subject: Re: Help with query involving aggregation and joining.
Date: Mon, 24 Feb 2003 21:21:37 +0530 (IST)
Message-ID: <1037.219.65.254.132.1046101897.squirrel@mail.trade-india.com> (raw)
In-Reply-To: <3E5A22EA.B1904F75@rodos.fzk.de>
References: <3E5A22EA.B1904F75@rodos.fzk.de>
sorry i did not post any sample data or definations.
i was replying to someone else's posting
i do get such an error on pgsql 7.3.2
regds
mallah.
>>
>> ERROR:
>> SELECT DISTINCT ON expressions must match
>> initial ORDER BY expressions may be gotten over by
>> wrapping the first query result in a subselect.
>>
>> not sure though if its proper.
>> regds
>> mallah.
>>
>> test=# SELECT * from ( SELECT distinct on (a.id) b.id
>> ,courseid,name,submission from course a join history b on
>> (a.id=b.courseid) ) as results order by results.submission desc;
>>
> I'm currently working with
> select version();
> version
> ---------------------------------------------------------------
> PostgreSQL 7.2.3 on hppa-hp-hpux10.20, compiled by GCC 2.95.2
> (1 row)
> I've used your table definitions and sample data you've sent earlier and do not receive an
> error message on the above SELECT statement. Did you?
>
> Regards, Christoph
-----------------------------------------
Get your free web based email at trade-india.com.
"India's Leading B2B eMarketplace.!"
http://www.trade-india.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mallah@trade-india.com, ch@rodos.fzk.de
Subject: Re: Help with query involving aggregation and joining.
In-Reply-To: <1037.219.65.254.132.1046101897.squirrel@mail.trade-india.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox