Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

N-TILE query without function

Status
Not open for further replies.

deltaair

IS-IT--Management
Nov 3, 2005
43
CH
Hello,

I have a table with 3 fields
id_person, id_event, value

I need to divide all id_person(s) into deciles/quartiles.
I am using ANSI SQL on Netezza and it does not support the Quartile/Ntile functions.

How can I write a manual query to give me a list of
id_persons, sorted in descending order of value, and a 3rd field with the ncile they fall into based on their value.

Thanks,
Manik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top