Query editor
WITHcurrent_price_project as (select'INS' as token_name,token_price_usd as current_pricefromdex.prices_latestwheretoken_address = 0xe9572938bcbf08adceE86Fd12A7C0D08dC4Ab841order byblock_time desclimit1),/*ins_price_all_the_time as (select date_trunc('day',hour) as day,avg(median_price) as pricefrom dex.priceswhere contract_address = 0xe9572938bcbf08adceE86Fd12A7C0D08dC4Ab841group by 1), */token_decimals as (SELECTraised_token_name,raised_token_decimal,project_token_decimal,lbp_contract,chain,timestamp_start,timestamp_endFROMdune.gooddatabadguybackup.result_fjord_listing_from_pool_forkedWHERE(chain || '-' || project || '-' || raised_token_name || '-' || CAST(lbp_contract AS VARCHAR)) = 'ethereum-INS-WETH-0x474ca8d19cbcd57e2ddf90c5a6b0841d250b9b96'),lifi as (SELECTblock_time as block_time_lifi,bytearray_to_uint256 (bytearray_substring (data, 65, 32)) as token_amount,bytearray_ltrim (bytearray_substring (data, 33, 32)) as user,tx_hash as tx_hash_lifiFROMethereum.logsWHEREcontract_address = 0x2dfaDAB8266483beD9Fd9A292Ce56596a2D1378D -- LiquidityBootstrapPooland topic0 in (0xb8c86983f929c6b770461983d1bbde1870408120f07123e9c12d49f35a0b4c4b -- LiFiTransferCompleted (index_topic_1 bytes32 transactionId, address receivingAssetId, address receiver, uint256 amount, uint256 timestamp))),PRICES AS (SELECT*FROMprices.usd_latestleft join token_decimals on 1 = 1wherelower(blockchain) = lower(chain)),