Query editor
with-- gSNAKE staked in the Nest, eligible to SNAKE rewardsstaked_gSNAKE AS (SELECTevt_block_time AS block_time,evt_block_number AS block_number,evt_tx_hash AS tx_hash,"user" AS player,(amount/1e18) AS gSNAKEFROM snakefinance_sonic.masonry_evt_staked),-- gSNAKE withdrawn (possible after 4 epochs)unstaked_gSNAKE AS (SELECTevt_block_time AS block_time,evt_block_number AS block_number,evt_tx_hash AS tx_hash,"user" AS player,(-1)*(amount/1e18) AS gSNAKEFROM snakefinance_sonic.masonry_evt_withdrawn),-- Net gSNAKE stakednet_gSNAKE AS (SELECT player, SUM(gSNAKE) AS gSNAKEFROM (SELECT * FROM staked_gSNAKEUNION ALLSELECT * FROM unstaked_gSNAKE)GROUP BY 1),-- SNAKE rewards harvestedrewardPaid AS (SELECTevt_block_time AS block_time,evt_block_number AS block_number,evt_tx_hash AS tx_hash,"user" AS player,(reward/1e18) AS SNAKEFROM snakefinance_sonic.masonry_evt_rewardpaid)SELECT *FROM net_gSNAKEORDER BY gSNAKE DESC