get number of values that only appear once in a column in influx
I am using the http Api call from my application to influx. It seems like most of the SQl like queries doesnt work on influx. Can some on please help me on the same
I have a measuement called active_entries which contains ActionId, ActionStatus, ActionType, Actions as feilds
time | ActId | ActStatus | ActType | Act |
---|---|---|---|---|
1634825189495 | 50edfda | ACTIVE | X Act | X Act Generated |
1634825189496 | de90722 | ACTIVE | X Act | X Act Generated |
1634825189497 | ff4c11e | ACTIVE | X Act | X Act Generated |
1634825189498 | 5a4aed7 | ACTIVE | X Act | X Act Generated |
1634825189499 | 6eb8f50 | ACTIVE | X Act | X Act Generated |
1634828999815 | 50edfda | CLEARED | POR_ACT | X Act Cleared |
1634828999818 | de90722 | CLEARED | POR_ACT | X Act Cleared |
1634828999819 | ff4c11e | CLEARED | POR_ACT | X Act Cleared |
1634828999822 | 5a4aed7 | CLEARED | POR_ACT | X Act Cleared |
1634828999823 | 6eb8f50 | CLEARED | POR_ACT | X Act Cleared |
1634829059080 | cbe0e75 | ACTIVE | X Act | X Act Generated |
1634829059081 | 8636a82 | ACTIVE | X Act | X Act Generated |
1634829059082 | a954f37 | ACTIVE | X Act | X Act Generated |
1634829059083 | b10bbef | ACTIVE | X Act | X Act Generated |
1634829059084 | 8e9ce45 | ACTIVE | X Act | X Act Generated |
1634905420303 | cbe0e75 | CLEARED | POR_ACT | X Act Cleared |
1634905420308 | 8636a82 | CLEARED | POR_ACT | X Act Cleared |
In this case for every active ActionId a cleared Action will a come after certain time with the same ActionId a cleared Action come and entries into measurement.
How can i get the list of Active list actions which are not cleared
Output :-
time | ActId | ActStatus | ActType | Act |
---|---|---|---|---|
1634829059082 | a954f37 | ACTIVE | X Act | X Act Generated |
1634829059083 | b10bbef | ACTIVE | X Act | X Act Generated |
1634829059084 | 8e9ce45 | ACTIVE | X Act | X Act Generated |
How can i get the below output For the list
LastUpdatedDate | ActId | ActStatus | ActType | ActUpdated | ActDetails |
---|---|---|---|---|---|
1634828999815 | 50edfda | CLEARED | X Act | POR_ACT | X Act Cleared |
1634828999818 | de90722 | CLEARED | X Act | POR_ACT | X Act Cleared |
1634828999819 | ff4c11e | CLEARED | X Act | POR_ACT | X Act Cleared |
1634828999822 | 5a4aed7 | CLEARED | X Act | POR_ACT | X Act Cleared |
1634828999823 | 6eb8f50 | CLEARED | X Act | POR_ACT | X Act Cleared |
1634829059082 | a954f37 | ACTIVE | X Act | - | X Act Generated |
1634829059083 | b10bbef | ACTIVE | X Act | - | X Act Generated |
1634829059084 | 8e9ce45 | ACTIVE | X Act | - | X Act Generated |
1634905420303 | cbe0e75 | CLEARED | X Act | POR_ACT | X Act Cleared |
1634905420308 | 8636a82 | CLEARED | X Act | POR_ACT | X Act Cleared |