Re: Is relational theory irrelevant?
Date: Fri, 14 Nov 2003 10:21:03 +0200
Message-ID: <3FB4906F.10708_at_atbusiness.com>
Carl C. Federl wrote:
>Christopher Browne <cbbrowne_at_acm.org> wrote in message news:<borj63$1i4fo4$1@ID-125932.news.uni-berlin.de>...
>
>
>>A long time ago, in a galaxy far, far away, Lauri Pietarinen <lauri.pietarinen_at_atbusiness.com> wrote:
>>
>>
>>>OK, but is
>>>
>>>select top 5 * from (
>>> select * from emp order by sal
>>>)
>>>
>>>legal SQL now a'days?
>>>
>>>Is it supported in products?
>>>
>>>
>>No, it is not 'legal SQL.'
>>
>>It is a proprietary extension used by one vendor.
>>
>>
>The SQL standard now includes the concept of windowing functions in
>addition to the grouping functions. The SQL statement to Rank by
>salary within each department would be on the order of:
>
>select employeeId , employeeName, SalaryAmt,DepartmentId
>, rank() over (partition by departmentId order by salaryAmt) as
>SalaryRank
>from employees
>
OK, thanks for the info. I will have to take a closer look at this.
BTW what does the above statement produce?
Lauri Received on Fri Nov 14 2003 - 09:21:03 CET