Query editor
with--- ETHEREUM (недекодированный -> общая erc20)tx_eth as (select date_trunc('day', evt_block_time) as day, count(evt_tx_hash) as tx_count, sum(value) as tx_valuefrom erc20_ethereum.evt_Transferwhere contract_address = 0x34c9c643becd939c950bb9f141e35777559817cb -- VGBP Ethereumgroup by 1)--- SOLANA (materialized view), tx_sol as (select cast(day as timestamp) as day, tx_count, tx_valuefrom dune.vnx.result_solana_vgbp_transactionswhere token_mint_address = '5H4voZhzySsVvwVYDAKku8MZGuYBC7cXaBKDPW4YHWW1' -- VGBP)--- BASE, tx_base as (select date_trunc('day', evt_block_time) as day, count(evt_tx_hash) as tx_count, sum(value) as tx_valuefrom vnx_base.vgbp_evt_Transfergroup by 1)--- CELO, tx_celo as (select date_trunc('day', evt_block_time) as day, count(evt_tx_hash) as tx_count, sum(value) as tx_valuefrom erc20_celo.evt_Transferwhere contract_address = 0x7ae4265ecfc1f31bc0e112dfcfe3d78e01f4bb7f -- VGBP Celogroup by 1)--- Непрерывный ряд дней, days as (select d.dayfrom unnest(sequence(timestamp '2024-12-01', date_trunc('day', cast(now() as timestamp)), interval '1' day)) as d(day))--- Дневные значения в GBP, NULL -> 0, tx_daily as (selectd.day, coalesce(e.tx_count, 0) as tx_count_eth, coalesce(cast(e.tx_value as double), 0) / pow(10, 18) as tx_value_eth, coalesce(s.tx_count, 0) as tx_count_sol, coalesce(cast(s.tx_value as double), 0) / pow(10, 9) as tx_value_sol -- decimals=9