Subject Re: [firebird-support] Top N Orders
Author Mahesh Ishwar
I couldn't get u martijn. Can u explain with some example.


Martijn Tonies <m.tonies@...> wrote:

> 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.

Of course this only works on the resultset.

The idea is that you provide the FIRST function with the right
resultset. So if you want some grouping, do that yourself.

With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions

Yahoo! Groups SponsorADVERTISEMENT

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Yahoo! Plus - For a better Internet experience

[Non-text portions of this message have been removed]