Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Extending my question. Was: The relational model and relationalalgebra - why did SQL become the industry standard?

Re: Extending my question. Was: The relational model and relationalalgebra - why did SQL become the industry standard?

From: Bob Badour <bbadour_at_golden.net>
Date: Fri, 21 Feb 2003 02:16:49 -0500
Message-ID: <oLk5a.165$Ji.17429648@mantis.golden.net>

"Paul Vernon" <paul.vernon_at_ukk.ibmm.comm> wrote in message news:b2qgik$isu$1_at_sp15at20.hursley.ibm.com...
> "Bob Badour" <bbadour_at_golden.net> wrote in message
> news:AmR3a.85$dV5.14819377_at_mantis.golden.net...
> > "Lauri Pietarinen" <lauri.pietarinen_at_atbusiness.com> wrote in message
> > news:3E4E7C35.9010800_at_atbusiness.com...
> > > Quota queries look like this:
> > >
> > > emp OVER {salary}
> > > WHERE deptno = 1
> > > RETURN 10 BY {salary desc}
> > >
> > > so also making a distinction between ordering and
> > > quota queries.
> >
> > I think this is much clearer and easier to use than some of the quota
query
> > specifications I have seen. (I guess TOP...ORDER BY is a proprietary
> > SqlServer extension?)

>
> What happens here if the 10th and 11th ranking of employees by salary have
the
> same salary? Should you not get a compile error if salary is not unique
> within emp?

>

> I'm rather partial to DB2's
> RANK() OVER ()
> and
> RANK_DENSE() OVER()
>

> for quota queries.

I like this even better.

> > It's very clear that one can output the results in a different order:
> >
> > SELECT emp OVER {salary} WHERE deptno = 1 RETURN 10 BY {salary desc}
ORDER
> > BY surname;
> >

>

> Regards
> Paul Vernon
> Business Intelligence, IBM Global Services
> Received on Fri Feb 21 2003 - 01:16:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US