Fixed a bud in DynamicOffsets(): replaced a period with a comma in an array list.
Fixed query optimisation for grouped data.