Subject | Re: [firebird-support] Top N Orders |
---|---|
Author | Helen Borrie |
Post date | 2003-07-16T09:40:20Z |
At 10:29 AM 16/07/2003 +0100, you wrote:
*ordered set*. All you need to do is design the set and SELECT FIRST will
do the rest.
e.g.
select first 2 <column-list> from sales
where sales_date between <adate> and <bdate>
order by sale_total desc
heLen
>Hi All,The point about SELECT FIRST m is that it is designed to operate on an
>Can I've a top N query where I can get the top N data for a particular
>group. For example :
>I've a sales tables which contain data for each & every sale. I want ot
>have Top 2 sales of each month.
>The 'Select First X.....' clause seems to be only for the result set & not
>the group.
*ordered set*. All you need to do is design the set and SELECT FIRST will
do the rest.
e.g.
select first 2 <column-list> from sales
where sales_date between <adate> and <bdate>
order by sale_total desc
heLen