Hello @juecoree,
There is a major error in the WHERE clauses of all the queries you show in your posts:
WHERE ... timestamp >= '2017/01/01' AND timestamp >='2018/01/01'
The first filter (timestamp >='2017/01/01'
) is useless as it will be excluded by the second one.
The second filter should be timestamp <'2018/01/01'
.
I am afraid all the data you presented in your post are invalid!
@arcange thanks for pointing one this errors. I made a typo in the write up. I have actually run
WHERE timestamp >='2017/01/01' AND timestamp < '2018/01/01'
. I also update the post so that to correct misinformation in my sql queries.