DWH n days ago up to now
copy paste thingy
To query data for a datawarehouse report starting at n-days ago at midnight up to newest available data, I can use the following SQL:
timestamp(char(date(current timestamp - 2 days)) concat '-00.00.00.000000')
timestamp(char(date(current timestamp - 2 days)) concat '-00.00.00.000000')
