I search many questions and answers. It seems the official documentation of time regions can not tell me how to display different timeshift on same graph. For example, I want to show the metric of online user number with the comparison between today, yestoday and 7 days ago.
First, you can write a scrit for today like:
SELECT sum() AS “Today” FROM "" WHERE time >= ‘2020-12-21T00:00:00Z’ GROUP BY time(1m)
Second
SELECT sum() AS “Yesterday” FROM "" WHERE time >= ‘2020-12-20T00:00:00Z’ and time <= ‘2020-12-20T23:59:00Z’ GROUP BY time(1m)
third:
SELECT sum() AS “Last7day” FROM "****" WHERE time >= ‘2020-12-14T00:00:00Z’ and time <= ‘2020-12-14T23:59:00Z’ GROUP BY time(1m)
after you choose concatenate under the transfomation tab