removing date_trunc unefficient queries