Grant insert to cacheapp so that data usage per device can be calculated
Can't be called on null input
using BETWEEN instead of weird timezone-timerange type
add index and two additional joins