Two rows same measurement linking together

All we have a table with column execId and secondaryExecId we want to basically group by them.


select secondary_exec_id,source_execution_id from DATA order by time desc limit 2;
name: DATA
time secondary_exec_id source_execution_id

1539274219182000000 1574769934527897601 3460988124019032354
1539274219177000000 3460988124019032354

so each one of those rows as an amount field and I want to report on that by subtracting them both.