percentile

G

Guest

Hi all,

let say i have list in product table(ID,product,price).my objective is to
point into certain row whereby this row is x percentile from the list and x
is user input.The thing is that i want the list by price in desc order.

example
product table
ID product price
1 A $7
2 B $5
3 C $6
4 D $1
5 E $2
6 F $9
7 G $8
8 H $3

so if price in desc order would be
6 F $9
7 G $8
1 A $7
3 C $6
2 B $5
8 H $3
5 E $2
4 D $1

say i want 60% as percentile so it would be int(0.6*count(transaction.ID)) = 4
and it turn out to be ID = 3
how should i do this?Please help

regards,
jv
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top