Query editor
WITHPendleSwapLog as (SELECTvarbinary_to_uint256 (topic2) as user_fid,SUM(varbinary_to_uint256 (data) * power(10, -18)) as txn_volume,COUNT(tx_hash) as txn_countFROMarbitrum.logsWHEREcontract_address = 0x8715A1c69618c2605e6226b0FdA018a1c92DE372AND topic1 != 0x0000000000000000000000000000000000000000000000000000000000000000GROUP BYvarbinary_to_uint256 (topic2)),PendleReferrerLog as (SELECTvarbinary_to_uint256 (topic3) as user_fid,SUM(varbinary_to_uint256 (data) * power(10, -18)) as txn_volumeFROMarbitrum.logsWHEREcontract_address = 0x8715A1c69618c2605e6226b0FdA018a1c92DE372AND topic1 != 0x0000000000000000000000000000000000000000000000000000000000000000GROUP BYvarbinary_to_uint256 (topic3)),PendleEventLog as (SELECTvarbinary_to_uint256 (topic1) as event_phase,varbinary_to_uint256 (topic2) as user_fid,varbinary_to_uint256 (topic3) as referrer_fidFROMarbitrum.logsWHEREcontract_address = 0x8Af971e408E894314BCFd947771c167859CEbf8BAND topic0 = 0xf5d2d36fd2c60192fd8f874c962737f1858ff797bf9865d071ade33eeee00701),FarcasterUserInfo as (SELECTfid as user_fid,fname as user_nameFROMdune.neynar.dataset_farcaster_fnames),Score as (SELECTfui.user_name as user_name,psl.user_fid as user_fid,psl.txn_volume as usage_volume,psl.txn_count as txn_count,prl.txn_volume as referrer_volume,COALESCE(psl.txn_volume, 0) * 10000 + COALESCE(psl.txn_count, 0) * 10 + COALESCE(prl.txn_volume, 0) * 1000 as total_scoreFROMPendleSwapLog pslLEFT JOIN PendleReferrerLog prl ON prl.user_fid = psl.user_fidLEFT JOIN FarcasterUserInfo fui on fui.user_fid = psl.user_fid)SELECTROW_NUMBER() OVER (ORDER BY