This is an old revision of the document!
I have been tinkering with LibreOffice Calc and read a book on analysing company data. I came across some interesting statistics functions beyond what most schools teach. Most of them give you a basic introduction on the SUM-Fuction, IF-Fuction etc.
I would like to draw your attention on the RANK-Fuction which can be used to analyse the importance of a product group in terms of sales. I have written down an example on how to use this function which shows two products sold to 11 customers and what amount of turnover they make. These sales figures are then put through the RANK-fuction.
I don't know if Postgres has a similar fuction built in but it does have some statistics functions which can be used right on the database-server side.
Feel free to grab the demo sheet from http://www.tapwag.org/Rank_Demo.ods