Updated DiscountReport SQL to be compatible with postgres