-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
126c80f
commit c555701
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
models/projects/solana/raw/ez_solana_token_account_mapping.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{ | ||
config( | ||
materialized="table", | ||
snowflake_warehouse="SOLANA", | ||
database="solana", | ||
schema="raw", | ||
alias="ez_token_account_mappings", | ||
) | ||
}} | ||
|
||
select | ||
account_address | ||
, owner | ||
, start_b.block_timestamp as start_timestamp | ||
, coalesce(end_b.block_timestamp, sysdate()) as end_timestamp | ||
from solana_flipside.core.fact_token_account_owners | ||
left join solana_flipside.core.fact_blocks start_b on start_block_id = start_b.block_id | ||
left join solana_flipside.core.fact_blocks end_b on end_block_id = end_b.block_id |