Query editor
with chain_ids(blockchain, id) as(values('ethereum', 1), ('optimism', 10), ('polygon', 137), ('avalanche_c', 43114),('arbitrum', 42161), ('gnosis', 100), ('fantom', 250), ('bnb', 56),('moonriver', 1285), ('moonbeam', 1284), ('celo', 42220), ('okex', 66),('fuse' , 122), ('harmoney', 1666600000)), tokens as (with missed_tokens(blockchain, contract_address, decimals, symbol) as(values('arbitrum', '0x0000000000000000000000000000000000000000', 18, 'ETH'), --ETH('arbitrum', '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', 18, 'ETH'), --ETH('optimism', '0x0000000000000000000000000000000000000000', 18, 'ETH'), --ETH('optimism', '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', 18, 'ETH'), --ETH('ethereum', '0x0000000000000000000000000000000000000000', 18, 'ETH'), --ETH('gnosis', '0x0000000000000000000000000000000000000000', 18, 'XDAI'),--XDAI('avalanche_c', '0x0000000000000000000000000000000000000000', 18, 'AVAX'),('avalanche_c', '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', 18, 'AVAX'),('bnb', '0x0000000000000000000000000000000000000000', 18, 'BNB'),('bnb', '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', 18, 'BNB'),('polygon', '0x0000000000000000000000000000000000000000', 18, 'MATIC'),('polygon', '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', 18, 'MATIC'))select blockchain, contract_address, decimals, symbol from tokens.erc20unionselect blockchain, contract_address, decimals, symbol from missed_tokensunionselect blockchain, contract_address, decimals, symbol from prices.tokens where blockchain = 'polygon'), prices as (select blockchain, symbol, minute, avg(price) as pricefrom prices.usd_forward_fillwhere minute > '2021-12-4' --and blockchain in ('ethereum', 'polygon', 'bnb', 'gnosis', 'avalanche_c', 'arbitrum', 'optimism')-- and symbol not in ('BIFI', 'LIT', 'PAR', 'GTC', 'DG', 'MON', 'BANK', 'STACK', 'IMX', 'VEST', 'LOOT', 'DEC', 'WAIT', 'DUCK', 'TIME', 'RADAR', 'OHM', 'NCT', 'SYN',--'ISLA')group by 1,2,3), bridges(blockchain, bridge_id, bridge) as (values('arbitrum', 1, 'Hop'), ('arbitrum', 2, 'Anyswap'), ('arbitrum', 10, 'Refuel'), ('arbitrum', 14, 'Cbridge'),('arbitrum', 15, 'Hyphen'), ('arbitrum', 16, 'Hop'), ('arbitrum', 21, 'Stargate'), ('arbitrum', 5, 'Hop'),('arbitrum', 6, 'Across'), ('arbitrum', 7, 'Cbridge'), ('arbitrum', 8, 'Across'), ('arbitrum', 9, 'Cbridge'),('ethereum', 1, 'Hop'), ('ethereum', 11, 'Across'), ('ethereum', 12, 'Hyphen'), ('ethereum', 13, 'Cbridge'),('ethereum', 14, 'Refuel'), ('ethereum', 17, 'Cbridge'), ('ethereum', 18, 'Hop'), ('ethereum', 19, 'Optimism'),('ethereum', 2, 'Polygon'), ('ethereum', 20, 'Optimism'), ('ethereum', 25, 'Stargate'), ('ethereum', 3, 'Arbitrum'),('ethereum', 4, 'Anyswap'), ('ethereum', 5, 'Hyphen'), ('ethereum', 8, 'Optimism'), ('ethereum', 9, 'Cbridge'),('optimism', 1, 'Hop'), ('optimism', 12, 'Cbridge'), ('optimism', 13, 'Cbridge'), ('optimism', 14, 'Hyphen'),('optimism', 15, 'Hop'), ('optimism', 20, 'Stargate'), ('optimism', 4, 'Hop'), ('optimism', 5, 'Across'),('optimism', 6, 'Cbridge'), ('optimism', 7, 'Across'), ('optimism', 8, 'Cbridge'), ('optimism', 9, 'Refuel'),('polygon', 1, 'Hop'), ('polygon', 10, 'Refuel'), ('polygon', 13, 'Across'), ('polygon', 14, 'Hyphen'),('polygon', 17, 'Cbridge'), ('polygon', 19, 'Cbridge'), ('polygon', 2, 'Anyswap'), ('polygon', 20, 'Cbridge'),('polygon', 21, 'Hop'), ('polygon', 28, 'Stargate'), ('polygon', 29, 'Stargate'), ('polygon', 3, 'Hyphen'),('polygon', 7, 'Hop'), ('polygon', 8, 'Cbridge'), ('bnb', 1, 'Anyswap'), ('bnb', 11, 'Cbridge'),('bnb', 14, 'Stargate'), ('bnb', 4, 'Across'), ('bnb', 6, 'Hyphen'), ('bnb', 7, 'Cbridge'),('bnb', 8, 'Refuel'), ('gnosis', 1, 'Hop'), ('gnosis', 4, 'Hop'),('gnosis', 5, 'Refuel'), ('gnosis', 8, 'Hop'), ('avalanche_c', 1, 'Anyswap'), ('avalanche_c', 11, 'Cbridge'),('avalanche_c', 14, 'Stargate'), ('avalanche_c', 2, 'Hyphen'), ('avalanche_c', 4, 'Cbridge'), ('avalanche_c', 6, 'Hyphen'),('avalanche_c', 7, 'Cbridge'), ('avalanche_c', 8, 'Refuel')