mirror of
https://github.com/FlipsideCrypto/osmosis-models.git
synced 2026-02-06 09:26:49 +00:00
lag
This commit is contained in:
parent
2cb35d063b
commit
ab92f4b22e
@ -55,10 +55,15 @@ FROM
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp)
|
||||
FROM
|
||||
{{ this }}
|
||||
_inserted_timestamp >= DATEADD(
|
||||
'minute',
|
||||
-30,(
|
||||
SELECT
|
||||
MAX(
|
||||
_inserted_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
@ -66,13 +66,16 @@ WITH b AS (
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
_inserted_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
_inserted_timestamp >= DATEADD(
|
||||
'minute',
|
||||
-30,(
|
||||
SELECT
|
||||
MAX(
|
||||
_inserted_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
)
|
||||
{% endif %}
|
||||
),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user