0

hi,

table : kisiler

name surname points
----- -------- ----
ali elli 1
ali elli 5
ali elli 5
veli kollu 3
veli kollu 4
adem bacakli 2
ali elli 4


how can i get reqult which has been shown below ? MAX value

ali elli 5
ali elli 5

thanks

2
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by campkev
0

not 100% sure what you are going for, but hopefully one of these will either do it for you or get you going in the right direction


1. this will give you each person and their max

select name,surname,max(points)as mp from kisiler group by name,surname

2. this will give you each person and all instances of their max

select k.* from kisiler k
inner join (select name,surname,max(points)as mp from kisiler group by name,surname) c
on c.name = k.name and c.surname = k.surname and k.points = c.mp

3. this will give you all instance of anyone who got the max points

select * from kisiler  where points = (select max(points) from kisiler)

if you need more help let me know

0

Thank you very very very much,

You realy give very important eamples. they will help me future.

Thank again.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.