I have the following Initial Data, see http://sqlfiddle.com/#!18/9eecb/103607 with the relevant code which gets the data to collate all amounts which are the same (absolute