Hi all,
I am currently building a database to work out commission payable. I have hit a snag when it comes to working out some "commission kickers" (e.g. on the third settled deal commission goes from A% to B% etc).
I basically need to rank the deals by the date they were settled for each referring company... Below is a mock table of what i need as an outcome of a query... but i am unsure how to build the query itself! and i'm not exactly savvy with SQL views and coding. THANK YOU!
Referring Company DealName DateSettled Rank Introducer A DealCat 09 Dec 4 Introducer A DealDog 21 Feb 2 Introducer A DealFish 10 Aug 3 Introducer A DealHorse 06 Jan 1 Introducer B DealCow 07 Oct 2 Introducer B DealAnt 16 Dec 3 Introducer B DealRabbit 11 Jul 1 Introducer C DealShark 06 Dec 1 Introducer D DealBird 08 Jan 1 Introducer D DealElephant 25 Dec 2