11 Replies Latest reply: May 7, 2011 1:30 PM by Nagaian Krishnamoorthy RSS

    Split a table in intervals

    mauich123

      Hi

      I need some help with splitting a table in intervals

      I have a simple table that has two fields

      customerid, totalamount

      This table is changed from day to day.

      What I want to do is to add a column to this table ranking customers from 1-5 depending on how much they've bought (totalamount). So i want to split the table into 5 "clusters" ranking from 5-1 where 5 is the customers who has bought the most.

      This seems fairly simple but I can't figure it out

      Thanks in advance!