updated fetch records_today query