Query editor
-- This query used incompatible data types from Dune SQL alpha and may need to be updated.-- More details can be found on https://dune.com/docs/query/dunesql-changes/SELECTAVG("Total Staked") as "Avg FTM Staked by user",approx_percentile("Total Staked", 0.5) AS med_ftm_stakedfrom(SELECTt."from" as user,SUM(value) / 1e18 AS "Total Staked"FROMstader_labs_fantom.FTMStaking_evt_LogDeposited as dINNER JOIN fantom.transactions as t ON d.evt_tx_hash = t.hashAND t.success = TRUEGROUP BYt."from"ORDER BY"Total Staked" desc) t