sssstatisticReferral IV (2024-11-21 03AM - 2024-11-28 03AM UTC)
    Updated 2024-12-28
    -- forked from Referral III (2024-11-11 03AM - 2024-11-18 03AM UTC) @ https://flipsidecrypto.xyz/studio/queries/7f227a0f-a715-481e-b438-0d38b517b694

    -- forked from Referral I (2024-10-11 03AM - 2024-10-18 03AM UTC) @ https://flipsidecrypto.xyz/studio/queries/dccfb12c-f9bf-42f2-bb7d-4963fc7c9773

    -- forked from TOP Referrers (On-chain) @ https://flipsidecrypto.xyz/studio/queries/50138a96-6dc5-4abf-aa54-7ea8ff4e8160

    With reset_time as (
    select
    origin_from_address,
    max(block_timestamp) AS block_timestamp
    from blast.core.ez_decoded_event_logs
    where contract_address = '0xc48f6213a1a4d3ead79db812c2b91817980532c3'
    and event_name IN ('WithdrawRewardFromPool')
    group by origin_from_address
    ),
    timeline as (
    select
    origin_from_address,
    event_name,
    max(block_timestamp) AS block_timestamp
    from blast.core.ez_decoded_event_logs el
    where contract_address = '0xc48f6213a1a4d3ead79db812c2b91817980532c3'
    and event_name IN ('LevelUpSamurai', 'LevelUpPet')
    and not exists (
    select 1
    from reset_time rt
    where rt.origin_from_address = el.origin_from_address
    and rt.block_timestamp > el.block_timestamp
    )
    group by origin_from_address, event_name
    ),
    samurai_level as (
    select
    el.origin_from_address,
    max(
    CASE
    Last run: about 2 months ago
    REFERRER
    Total People Invited
    Total Samurai Level
    Total Points
    1
    0x8088c5f71b2240b0fa63863f734690909b0d7c22
    887167
    2
    0xf7c63ea1417fab25c2eaca1baa811863c81f113f
    1236156
    3
    0xb6dbdc31413d26e08450e9d5debc2aaaa8b0b848
    1232152
    4
    0xed7815a4927161cead30f5c1aebb1b851513fb28
    1224144
    5
    0xce17058da93bd26d72b4a1794db96e6131bda71d
    1224144
    6
    0x71fae08675f5396a2bf1c31fa9f11f298a13510f
    1133143
    7
    0xc88fc061b5cf8c0152bef4d48b42422ff1ba9b3a
    858138
    8
    0x8186493c7588763759182b6c464ab17d22a4d73a
    1122132
    9
    0x890f60caf6bf26e946e7a6de8d1399867b2a6719
    1122132
    10
    0xf3799da183a7a7e8da67e59d561be0a638643d84
    1122132
    11
    0x09fc3fefd50a777a68058ff04b68b247c24d5ffa
    1122132
    12
    0x5e270fce6d74766a6302eeef18779332c04c260b
    1020120
    13
    0x08050347f6cd00a6ad70cfe6ad3bd318706eb378
    1020120
    14
    0xcdf69c061196022f46cd1d749441faca36ca75ac
    1020120
    15
    0x05470de74dbefc4bbe14574d386e506c828150b3
    1020120
    16
    0xac4f15c0a27ca5706fc64b329faf1900f93a2b1d
    1020120
    17
    0x620837b9c35505bdc071c890c0da26f81ddf2aba
    1020120
    18
    0xe5edcaac0807fa30500601e30f0bd61bc5910d40
    1020120
    19
    0xabb098fb6680b1e2fca0ea4c049012483768a211
    918108
    20
    0x4f0465c56c8170365db1bbf5c9ab781e7ab73ed3
    918108
    ...
    257
    14KB
    10s