DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login

A Select Query

By: rekha singh | 04 Feb 2010 3:17 pm

HI,

I am looking for a query which will give me top 3 records based on the a particular field. If there less than 3 records of that field then it gives what is available

The ordered table is as under

Value 1 Value 2 Type
1 2 A
3 4 A
5 6 A
7 8 A
9 10 B
11 12 B
13 14 C
15 16 D
17 18 D
19 20 D
21 22 D
23 24 E
25 26 E
27 28 E

I want the query to return the following based on "Type".

Value 1 Value 2 Type
1 2 A
3 4 A
5 6 A
9 10 B
11 12 B
13 14 C
15 16 D
17 18 D
19 20 D
23 24 E
25 26 E
27 28 E

Can anyone help please ?

Thanks,

Regards,

 

Comments

No Comments Posted for this Article.

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move