MoDeFieclipse rps - info over time
    Updated 2025-03-03
    with hand_paper_raw as (
    select BLOCK_TIMESTAMP, SIGNERS[0] as user, 'play' as event, split(VALUE:parsed,'_')[0] as action, split(VALUE:parsed,'_')[1]::float as amount, value as log
    from eclipse.core.fact_transactions,
    table(FLATTEN(input => INSTRUCTIONS)) as flattened
    where ACCOUNT_KEYS[1]:pubkey='BGh13zVibtk3kge1K3u8kTbfk4Zyqmf7coqm8YoU6Wio'
    and SIGNERS[1] is null
    and VALUE:parsed IS NOT NULL
    and VALUE:parsed:info IS NULL
    and BLOCK_TIMESTAMP::date>='2024-12-20'
    union all
    select BLOCK_TIMESTAMP, SIGNERS[0] as user, 'result' as event, split(VALUE:parsed,'_')[0] as action, split(VALUE:parsed,'_')[1]::float as amount, value as log
    from eclipse.core.fact_transactions,
    table(FLATTEN(input => INSTRUCTIONS)) as flattened
    where SIGNERS[1]='BGh13zVibtk3kge1K3u8kTbfk4Zyqmf7coqm8YoU6Wio'
    and VALUE:parsed IS NOT NULL
    and VALUE:parsed:info IS NULL
    and BLOCK_TIMESTAMP::date>='2024-12-20')

    select date_trunc({{Interval}},BLOCK_TIMESTAMP) as Date,
    sum(case when event='play' then 1 else 0 end) as plays,
    count(distinct user) as players,
    sum(case when event='result' and action='draw' then 1 else 0 end) as draws,
    sum(case when event='result' and action='win' then 1 else 0 end) as wins,
    plays-draws-wins as loses, 100*wins/plays as win_rate,
    sum(case when event='play' then amount else 0 end) as paid,
    sum(case when event='result' then amount else 0 end) as paid_back,
    paid_back-paid as net_gain
    from hand_paper_raw
    group by 1




    Last run: 13 days ago
    DATE
    PLAYS
    PLAYERS
    DRAWS
    WINS
    LOSES
    WIN_RATE
    PAID
    PAID_BACK
    NET_GAIN
    1
    2025-01-28 00:00:00.00039206141935.8974360.17250.1675-0.005
    2
    2025-01-25 00:00:00.000683815213230.8823530.37250.450.0775
    3
    2025-01-17 00:00:00.00032181241612.50.08750.05-0.0375
    4
    2025-01-24 00:00:00.00059359212935.593220.3050.4350.13
    5
    2025-02-05 00:00:00.00011712818.1818180.080.035-0.045
    6
    2025-02-24 00:00:00.00014644628.5714290.050.05250.0025
    7
    2025-02-28 00:00:00.0006612333.3333330.0150.0125-0.0025
    8
    2025-01-05 00:00:00.000853215323837.6470590.380.3175-0.0625
    9
    2025-02-15 00:00:00.00088026250.02750.01-0.0175
    10
    2025-02-14 00:00:00.00044112250.010.0075-0.0025
    11
    2025-01-23 00:00:00.000732817213528.7671230.27250.23-0.0425
    12
    2024-12-25 00:00:00.00025979657511928.9575291.46751.355-0.1125
    13
    2025-01-21 00:00:00.0001153324395233.9130430.52250.4925-0.03
    14
    2025-02-04 00:00:00.0002585812320.1550.105-0.05
    15
    2025-02-08 00:00:00.00055172325745.4545450.2350.27250.0375
    16
    2024-12-20 00:00:00.0002913121441.379310.260.225-0.035
    17
    2025-02-12 00:00:00.0007411514.2857140.01750.0075-0.01
    18
    2025-01-01 00:00:00.0007527222429320.29250.2425-0.05
    19
    2025-01-19 00:00:00.00033204121736.3636360.20.195-0.005
    20
    2025-02-19 00:00:00.00011502918.1818180.0350.025-0.01
    68
    5KB
    862s