Ranking?
От
Sjors
Тема
Ranking?
Дата
Msg-id
000801c3837c$100ff350$04a779d9@cc299057a
Список
Дерево обсуждения
Re: Ranking? "Sjors" <jkwast@freeler.nl>
Hi list,
Wondering if you could help me out here? I've got a table like this:
id name data
1 sully 567
2 sully 789
3 sully 456
4 denan 890
5 denan 678
now I want to have this:
id name data rank
1 sully 567 2
2 sully 789 1
3 sully 456 3
4 denan 890 1
5 denan 678 2
I'm think along the lines with count, something like this:
select id,name,data, (select count (names) from table as tmp where data.tmp > data.table) as rank
this (I know) is not correct. What would be?
Greetings sjors
В списке pgsql-novice по дате отправления