rezarwzDaily bets and volume base on markets questions
    Updated 2025-02-26
    -- forked from Daily bets and volume base on markets @ https://flipsidecrypto.xyz/studio/queries/e9393923-7c6d-458c-87b7-d38b03f97eed
    with markets_data as (
    WITH api_data AS (
    SELECT
    PARSE_JSON(
    livequery.live.udf_api(
    'https://api.dune.com/api/v1/query/4114067/results/?api_key=lJ1CV9LcjSB6qiqiOZOjZEVLFzwHNfmM'
    )
    ) AS resp
    )
    SELECT
    VALUE:Title as Market_Title,
    value:q_Title as Question_Title,
    value:token0 as token0,
    value:token1 as token1
    FROM
    api_data,
    LATERAL FLATTEN(input => resp:data:result:rows)
    ),
    all_bets as (
    SELECT
    ev.tx_hash as tx_hash,
    ev.block_Timestamp as block_Timestamp,
    DECODED_LOG:fee,
    DECODED_LOG:maker,
    DECODED_LOG:makerAmountFilled / pow(10, 18) as maker_amount,
    DECODED_LOG:makerAssetId,
    DECODED_LOG:taker,
    DECODED_LOG:takerAmountFilled / pow(10, 18) as taker_amount,
    DECODED_LOG:takerAssetId,
    CASE
    WHEN decoded_log:takerAssetId = 0 then decoded_log:takerAmountFilled
    when decoded_log:makerAssetId = 0 then decoded_log:makerAmountFilled
    end / 1e18 as Amount_USD,
    CASE
    WHEN decoded_log:takerAssetId = 0 then decoded_log:makerAssetId
    Last run: about 2 months ago
    DATE
    Market question
    AMOUNT_USD
    # of Bets
    1
    2024-10-10 00:00:00.000
    Will Donald J. Trump win the popular vote in the 2024 Presidential Election?
    98062.89212
    2
    2024-10-30 00:00:00.000
    World Series Champion: Dodgers vs. Yankees
    1285.03690713550
    3
    2024-11-01 00:00:00.000
    Will Harris lead in RCP by 0-0.4 on Nov 4?
    597.90847058836
    4
    2024-11-24 00:00:00.000
    Will Elon Musk be a member of the Trump administration?
    3363.31234
    5
    2024-12-01 00:00:00.000
    Will ETH be above $3,600 on December 3rd?
    63718.260432820
    6
    2024-12-12 00:00:00.000
    Will Black Myth: Wukong win the GOTY award?
    2572.13834
    7
    2024-12-28 00:00:00.000
    Will $COIN be above $275 at EOY?
    3460.292734
    8
    2024-12-25 00:00:00.000
    Will ETH outperform SOL EOY 2024?
    41998.908984
    9
    2024-09-10 00:00:00.000
    Will Donald J. Trump win the popular vote in the 2024 Presidential Election?
    49364.50616937992
    10
    2024-09-15 00:00:00.000
    Will the Raiders win Super Bowl 2025?
    800004
    11
    2024-09-15 00:00:00.000
    Will any other Republican Politician win the 2024 US Presidential Election?
    6931.4398714
    12
    2024-10-09 00:00:00.000
    FED decreases interest rates by 25 bps after November 2024 meeting?
    4653.90832
    13
    2024-11-13 00:00:00.000
    Will Patrick Mahomes win NFL MVP for the 2024-25 season?
    1043.059212
    14
    2024-11-28 00:00:00.000
    Hyperliquid market cap (FDV) <$2.5b one day after launch?
    1241.4697226
    15
    2025-01-06 00:00:00.000
    Will Real Madrid win the UEFA Champions League?
    15577.45457628
    16
    2025-01-22 00:00:00.000
    Will BTC be above $105,000 on January 23rd?
    2140.54320890
    17
    2025-01-19 00:00:00.000
    Will Trump say "God" 4+ times?
    383.825612
    18
    2025-02-07 00:00:00.000
    Will SOL be above $200 on February 12th?
    222.00238
    19
    2024-10-19 00:00:00.000
    Will Kamala Harris win the 2024 US Presidential Election?
    295975.28798416
    20
    2024-10-17 00:00:00.000
    Ethereum all time high in 2024?
    23.11516
    ...
    7812
    710KB
    10s