Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% macro addresses_events_first_activity(blockchain, native_symbol) %}
{% macro addresses_events_first_activity(blockchain, native_symbol, lookback_days=2) %}
SELECT '{{blockchain}}' AS blockchain
, et."from" AS address
, MIN_BY(et."to", et.block_number) AS first_activity_to
Expand All @@ -25,7 +25,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '{{ lookback_days }}' day)
{% endif %}

GROUP BY et."from"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@

{{addresses_events_first_activity(
blockchain='bnb',
native_symbol = 'bnb'
native_symbol = 'bnb',
lookback_days = 3
)}}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ FROM (
gas_used
FROM
{{ source('optimism', 'transactions') }}
WHERE block_time >= date_trunc('day', now() - interval '7' day)
WHERE block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}
) et
LEFT JOIN (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LEFT JOIN (
{% if is_incremental() %}
LEFT JOIN {{this}} ffb ON et."from" = ffb.address
WHERE ffb.address IS NULL
AND et.block_time >= date_trunc('day', now() - interval '7' day)
AND et.block_time >= date_trunc('day', now() - interval '2' day)
{% endif %}

GROUP BY et."from"
Loading