Be Good. Do Good.
SELECT
A.id, A.ts, TIMEDIFF (B.ts,A.ts) AS timedifference
FROM log A
INNER JOIN log B ON B.id = (A.id + 1)
ORDER BY TIMEDIFF (B.ts,A.ts) DESC
Models are where your developers spend most of their time within a dbt environment. Models are primarily written as a select statement and ...