Skip to content

Instantly share code, notes, and snippets.

@KWKdesign
Last active August 29, 2015 14:03
Show Gist options
  • Save KWKdesign/ca6db1102a1e11d93a41 to your computer and use it in GitHub Desktop.
Save KWKdesign/ca6db1102a1e11d93a41 to your computer and use it in GitHub Desktop.
Schemaverse: Last Tic Duration
select
( select toc from my_events
where public and action = 'TIC'
and tic = ( select last_value-1 from tic_seq )
)::time -
( select toc from my_events
where public and action = 'TIC'
and tic = ( select last_value-2 from tic_seq )
)::time
;
--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment