[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Use of Aggregate Functions in SQR ??



Marge,

Any valid SQL with the exception of "select * from table"  can be
accomplished in SQR. You will likely want to use a column alias for the
aggregate column, otherwise SQR will create a column variable named
"&max(end_balance)".


begin-select
emplid
max(end_balance)        &max_balance
>From ps_pa_accums
Where  functn_result_nm = 'aaaaaa_b'
Group by emplid
end-select


Gina Bencke
gina@bencke.com

-----Original Message-----
From: Lempicki, Marge [mailto:Marge.Lempicki@WL.COM]
Sent: Friday, October 22, 1999 3:11 PM
To: Multiple recipients of list SQR-USERS
Subject: Use of Aggregate Functions in SQR ??


Can SQL aggregate functions be used in SQR ? I would like to be able to
get
the same functionality as the following SQL Statement.

Select  emplid,  max(end_balance)
  From ps_pa_accums
   Where  functn_result_nm = 'aaaaaa_b'
    Group by emplid

Thanks,

Marge