Return-Path: owner-postman Delivery-Date: Sun, 01 May 94 18:04:35 -0700 Return-Path: owner-postman Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id QAA16110 for postgres-redist; Sun, 1 May 1994 16:01:03 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199405012301.QAA16110@nobozo.CS.Berkeley.EDU> X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from eng.ie.cuhk.hk (eng.ie.cuhk.hk [137.189.98.200]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id QAA16094 for ; Sun, 1 May 1994 16:00:59 -0700 Received: by eng.ie.cuhk.hk (5.57/Ultrix3.0-C) id AA15237; Mon, 2 May 94 07:02:01 +0800 Received: from csun03.COMP.HKP.HK by csun02.COMP.HKP.HK (4.1/SMI-4.1) id AA13088; Mon, 2 May 94 07:00:31 HKT Date: Mon, 2 May 94 07:00:30 HKT From: cs400514@comp.hkp.hk (Lee Siu Hoi (BACS4 Class A)) Message-Id: <9405012300.AA13088@csun02.COMP.HKP.HK> To: postgres@postgres.Berkeley.EDU Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Sun, 01 May 94 16:01:03 -0700 Resent-XMts: smtp Hi all, I have problem in using aggregate functions: create test (i = int4, .... ) \g append test (i = 1, ... ) \g append test (i = 2, ... ) \g . . When I want to retrieve the instance that have the smallest i value: retrieve (t.all) from t in test where t.i = int4min {test.i} \g The parser reports error near the "{" symbol. It is legal to use aggregate function in the where statement? If no, any other approach can do the similar thing? I really need to make such queries. Thanks in advance. Any suggestion or hints will be appreciated. Hoi =============================================================================== To add/remove yourself from the POSTGRES mailing list: send mail with the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU" If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and a human will deal with it. DO NOT post to the "postgres" mailing list. ===============================================================================