I've been trying to represent a status based on elapsed time since the last e-mail update I received from one of two robots. I'm doing this using an image which changes its source asset based on an essql query.
Currently struggling to assemble an essql query that gives my answer which should be the difference in hours from now to the last update.
SELECT robot, LAST(timestamp) FROM emails_robos WHERE nome_cliente = 'AAA' OR nome_cliente = 'BBB' GROUP BY robot
Now, I'd still have to subtract NOW() from the result (which I found no way to do without casting both to LONG which doesn't seem to give out an accurate result - if you lend me a hand here I opened another toipic for that: Difference between two DATETIMEs in ESSQL in Canvas (No script fields)) and choose the larger of both values returned, but the problem here is that either using that or the FIRST function gives out the following error:
[essql] > Unexpected error from Elasticsearch: [verification_exception] Found 1 problem(s) line 1:15: Unknown function [LAST], did you mean any of [LEAST, CAST, LCASE, LEFT]?
Anyone stumbled upon this before? Thanks in advance =)