Added ordering per day and period, to avoid the mess of un-ordered records returned