如何使用 Apache Zeppelin 在一个图中组合多条线?

How to combine the multiple lines in one plot using Apache Zeppelin?

我有三个表,其中包含相同列的时间序列数据,例如:

 Time     Values
00:00         48
00:00         34 
00:01         87
00:02         79
00:02          3    
  ...        ...

这三个表的日期分别为 0512、0513 和 0514。现在我想绘制每一天的折线图,然后将 所有这些线 并排放在一个图中容易比较。我目前正在使用 Zeppelin 笔记本,并且知道如何绘制某一天的折线图:

%sql select time, value from df_12 group by time order by time

但我不知道如何将三天的折线图组合成一个图。

谢谢!

我找到答案了,就是用inner join函数代替union,比如:

%sql select t1.time, t1.value,coalesce(t2.value,0) as t2_value, 
coalesce(t3.value,0) as t3_value
from
(select time, sum(Values) as value from df_12 group by time) t1
inner join
(select time, sum(Values) as value from df_13 group by time) t2
on t1.time=t2.time
inner join
(select time, sum(Value) as value from df_14 group by time) t3
on t1.time=t3.time
order by time