near-models/models/gold/atlas/atlas__ez_nft_contract_metrics.sql

35 lines
714 B
MySQL
Raw Normal View History

2023-11-08 19:01:11 +00:00
{{ config(
materialized = 'view',
secure = false,
2023-12-01 21:03:53 +00:00
meta={
'database_tags':{
'table': {
'PURPOSE': 'ATLAS'
}
}
},
2023-11-08 19:01:11 +00:00
tags = ['atlas']
) }}
WITH nft_data AS (
2023-11-09 16:45:54 +00:00
2023-11-08 19:01:11 +00:00
SELECT
2023-11-09 17:38:15 +00:00
atlas_nft_table_id AS ez_nft_contract_metrics_id,
2023-11-08 19:01:11 +00:00
receiver_id,
tokens,
2023-11-08 19:36:09 +00:00
transfers_24h,
2023-11-08 19:01:11 +00:00
transfers_3d,
all_transfers,
owners,
transactions,
2023-11-08 19:36:09 +00:00
mints,
2023-12-11 19:47:56 +00:00
COALESCE(inserted_timestamp, '2000-01-01' :: TIMESTAMP_NTZ) AS inserted_timestamp,
COALESCE(modified_timestamp, '2000-01-01' :: TIMESTAMP_NTZ) AS modified_timestamp
2023-11-09 16:45:54 +00:00
FROM
{{ ref('silver__atlas_nft_table') }}
2023-11-08 19:01:11 +00:00
)
2023-11-09 16:45:54 +00:00
SELECT
2023-11-08 19:01:11 +00:00
*
2023-11-09 16:45:54 +00:00
FROM
nft_data