How to Plot Graph using Upper and Lower bound

Hello All,

I am trying to solve a problem. I am using MYSQL as data source. I have written two queries A and B. From query A I am plotting two lines (Upper and lower bound) and from Query B I am plotting actual data. I want to plot a graph in such a way where the lines plotted using query B going up that upper or going low than lower line of query A. line color should change.

I have another question -
Query A is fetching daily data. As data is being stored in the table on daily basis. but the time column has a date and time stamp in it. When i am plotting daily data it is plotting as dot (for that particular time). I want like - if i can ignore the time stamp and plot a line instead of a dot for an entire day. And I can use time column with timestamp in Query B for the same pannel as i am using hourly data.

Please be informed I am using Grafana V7.2.1 .