sql code to generate daily hotel stats