Google 电子表格 =query - 忽略单元格为空的实体
Google Spreadsheet =query - ignore entities where cell is empty
我的开始 table 看起来类似于以下内容
Person 1, 75
Person 2, 48
Person 3,
Person 4, 82
Person 5,
Person 6, 93
...
我现在尝试在以下查询中包含一个 "where" 语句以排除没有数值的实体。这是我目前必须向我展示上述集合中最低的 5 个值,并且到目前为止有效
=QUERY('DPS Transpose Tables'!D1:E29;"select D, max(E) group by D order by max(E) asc limit 5 label max(E) ''";0)
我怎样才能添加这样有效的东西
=QUERY('DPS Transpose Tables'!D1:E29;"select D where (E<>"" OR Is not NULL), max(E) group by D order by max(E) asc limit 5 label max(E) ''";0)
提前致谢!
试试这样 'where E >=0':
=QUERY('DPS Transpose Tables'!D1:E29,"select D, max(E) where E >=0 group by D order by max(E) asc limit 5 label max(E) ''",0)
你也可以试试'WHERE IS NOT NULL'
有时我发现使用 >= 0 并没有得到想要的结果
=QUERY('DPS Transpose Tables'!D1:E29,"select D, max(E) where E IS NOT NULL group by D order by max(E) asc limit 5 label max(E) ''",0)
使用 NOT Equal To 和 '' 带有单个 '' 组合的空字符串
其中 E <> ''
我的开始 table 看起来类似于以下内容
Person 1, 75
Person 2, 48
Person 3,
Person 4, 82
Person 5,
Person 6, 93
...
我现在尝试在以下查询中包含一个 "where" 语句以排除没有数值的实体。这是我目前必须向我展示上述集合中最低的 5 个值,并且到目前为止有效
=QUERY('DPS Transpose Tables'!D1:E29;"select D, max(E) group by D order by max(E) asc limit 5 label max(E) ''";0)
我怎样才能添加这样有效的东西
=QUERY('DPS Transpose Tables'!D1:E29;"select D where (E<>"" OR Is not NULL), max(E) group by D order by max(E) asc limit 5 label max(E) ''";0)
提前致谢!
试试这样 'where E >=0':
=QUERY('DPS Transpose Tables'!D1:E29,"select D, max(E) where E >=0 group by D order by max(E) asc limit 5 label max(E) ''",0)
你也可以试试'WHERE IS NOT NULL'
有时我发现使用 >= 0 并没有得到想要的结果
=QUERY('DPS Transpose Tables'!D1:E29,"select D, max(E) where E IS NOT NULL group by D order by max(E) asc limit 5 label max(E) ''",0)
使用 NOT Equal To 和 '' 带有单个 '' 组合的空字符串
其中 E <> ''