我无法弄清<ListView x:Name="DropList" ItemsSource="{Binding FilePaths}">
<ListView.ItemTemplate>
<DataTemplate>
<Label
Content="{Binding Converter={local:FileName}}"
/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
和sum
的工作原理。我正在使用版本0.13的Influxdb。
假设我有大量数据的时间测量,首先让我查询它以获得10行:
count
将回复:
> select count from X where time > 1472807400000000000 LIMIT 10
现在我将总结这一栏:
name: (X)
-------------------------
time count
1472807580000000000 1
1472807640000000000 1
1472807640000000000 1
1472807650000000000 3
1472807660000000000 1
1472807660000000000 6
1472807670000000000 1
1472807670000000000 3
1472807680000000000 1
1472807680000000000 1
> select sum(count) from X where time > 1472807400000000000 LIMIT 10
并计算此栏:
name: X
-------------------------
time sum
1472807400000000001 102
> select count(count) from X where time > 1472807400000000000 LIMIT 10
“count - 返回单个字段中非空值的数量”
不应该是name: X
-------------------------
time count
1472807400000000001 44
?
“sum - 返回单个字段中所有值的总和。”
不应该接近10
?(1,1,1,3,1,6,1,3,1,1)
答案 0 :(得分:2)
LIMIT
子句限制返回的结果数。任何函数调用都优先。
所以
select sum(count) from X where time > 1472807400000000000 LIMIT 10
在功能上等同于
select sum(count) from X where time > 1472807400000000000
同样
select count(count) from X where time > 1472807400000000000 LIMIT 10
在功能上等同于
select count(count) from X where time > 1472807400000000000