I have a database in Influxdb 1.7 with several columns and no tag key. I want to receive only fields where the value is greater than 0 (zero) (I'm using grafana to show)
like:
table1:
| time | A | B | C | D | E | F |....| AD | AE | ...
|167344...| 0 | 0 | 2 | 0 | 12 | 0 |....| 0 | 0 |
|167356... | 0 | 0 | 2 | 0 | 0 | 0 |....| 0 | 12 |
|167376... | 0 | 0 | 2 | 0 | 1 | 0 |....| 0 | 0 |
|167384... | 1 | 4 | 0 | 0 | 0 | 0 |....| 0 | 1 |
I would like to receive:
| time | A | B | AE |
|167384... | 1 | 4 | 1 |
I've tried:
select last("*") from "table1" where * > 0
select last(*) from "table1" where * > 0
select last(*) as bbb from "table1" where bbb > 0
and other similar queries, but doen't work