Hi!
Richard == Richard Clarke [EMAIL PROTECTED] writes:
Richard Because that wouldn't give the correct results.
Richard I want the top 5 rows for EACH id.
Richard A short example would be,
Richard mytable:
Richard IdValHits
Richard 1 a 10
Richard 1 b 15
Richard 1
Hi,
What would the plausability of a function like this being implemented in the
future.
create table mytable (id int, val char(255), hits int);
insert some data...
select max(5,hits) from mytable group by id;
This would allow selecting of the top 5 rows for each id according to the
hit
On Monday 04 March 2002 10:50 am, Richard Clarke wrote:
create table mytable (id int, val char(255), hits int);
insert some data...
select max(5,hits) from mytable group by id;
This would allow selecting of the top 5 rows for each id according to the
hit column.
Without this function it
]
To: Richard Clarke [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, March 04, 2002 5:56 PM
Subject: Re: extra max() function possibly very useful?
On Monday 04 March 2002 10:50 am, Richard Clarke wrote:
create table mytable (id int, val char(255), hits int);
insert some data...
select max(5
Correct.
Richard
- Original Message -
From: DL Neil [EMAIL PROTECTED]
To: Richard Clarke [EMAIL PROTECTED]; Christopher Thompson
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, March 04, 2002 6:34 PM
Subject: Re: extra max() function possibly very useful?
LIMIT to be applied
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 04 March 2002 19:09
Subject: Re: extra max() function possibly very useful?
Correct.
Richard
- Original Message -
From: DL Neil [EMAIL PROTECTED]
To: Richard Clarke [EMAIL PROTECTED]; Christopher Thompson
[EMAIL PROTECTED]; [EMAIL
-
From: Richard Clarke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 04 March 2002 19:09
Subject: Re: extra max() function possibly very useful?
Correct.
Richard
- Original Message -
From: DL Neil [EMAIL PROTECTED]
To: Richard Clarke [EMAIL PROTECTED]; Christopher