Query editor
WITH price_points AS (SELECT-- Decode the valuation timestamp from the sixth data slotfrom_unixtime(varbinary_to_bigint(varbinary_ltrim(varbinary_substring(data, 161, 32)))) AS valuation_at,-- Decode assetsPerShare from the fourth data slotCAST(varbinary_to_uint256(varbinary_substring(data, 97, 32)) AS DOUBLE) / 1e18 AS share_priceFROM arbitrum.logsWHERE contract_address =0x7b31a39550c89194c0fc3f0b8bf1b389a15af36d-- ReportSubmitted event signatureAND topic0 =0xf94e53f8d9b2a3751616409b5de74a49f1b9b6430e3bae51fbfb0d1725e27196),first_price AS (-- Get the earliest available share priceSELECTvaluation_at,share_priceFROM price_pointsORDER BY valuation_at ASCLIMIT 1),latest_price AS (-- Get the most recent share priceSELECTvaluation_at,share_priceFROM price_pointsORDER BY valuation_at DESCLIMIT 1),calculation AS (SELECTf.valuation_at AS inception_at,f.share_price AS inception_share_price,l.valuation_at AS latest_valuation_at,l.share_price AS latest_share_price,-- Calculate the available history with decimal-day precisionDATE_DIFF('second',f.valuation_at,l.valuation_at) / 86400.0 AS history_days,