fixed query used to compute summary of imports on a day.