Skip to content

Commit

Permalink
Add collections to erc721 balances (#1140)
Browse files Browse the repository at this point in the history
* Add collections to erc721 balances

* Update balances_ethereum_erc721_hour.sql

* Update balances_ethereum_erc721_latest.sql
  • Loading branch information
soispoke authored Jun 8, 2022
1 parent 560ee4c commit 812e5b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ SELECT
d.day,
b.wallet_address,
b.token_address,
b.tokenId
b.tokenId,
nft_tokens.name as collection
FROM daily_balances b
INNER JOIN days d ON b.day <= d.day AND d.day < b.next_day
LEFT JOIN {{ ref('tokens_ethereum_nft') }} nft_tokens ON nft_tokens.contract_address = b.token_address
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ SELECT
d.hour,
b.wallet_address,
b.token_address,
b.tokenId
b.tokenId,
nft_tokens.name as collection
FROM daily_balances b
INNER JOIN hours d ON b.hour <= d.hour AND d.hour < b.next_hour
LEFT JOIN {{ ref('tokens_ethereum_nft') }} nft_tokens ON nft_tokens.contract_address = b.token_address
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ SELECT
wallet_address,
token_address,
tokenId,
nft_tokens.name as collection,
updated_at
FROM {{ ref('transfers_ethereum_erc721_rolling_hour') }}
FROM {{ ref('transfers_ethereum_erc721_rolling_hour') }}
LEFT JOIN {{ ref('tokens_ethereum_nft') }} nft_tokens ON nft_tokens.contract_address = token_address

0 comments on commit 812e5b9

Please sign in to comment.