Ali3NTop 10 Assets With Highest Hack Volume (Raydium)
    Updated 2022-12-22
    with pricet1 as (
    select block_timestamp,
    t2.address_name as asset1,
    t3.address_name as asset2,
    swap_from_amount,
    swap_to_amount,
    swaP_from_mint,
    swap_to_mint
    from solana.core.fact_swaps t1 join Solana.core.dim_labels t2 on t1.swap_from_mint = t2.address join solana.core.dim_labels t3 on t1.swap_to_mint = t3.address
    where SUCCEEDED = 'TRUE'),

    pricet2 as (
    select address,label,address_name
    from solana.core.dim_labels
    where address_name ilike '%usd%'
    and label_subtype='token_contract'),

    pricet as (
    select block_timestamp::date as date1,
    swap_from_mint,
    sum(swap_from_amount) as volume1,
    sum(swap_to_amount) as volume2,
    volume2/volume1 as usdprice
    from pricet1
    where swap_to_mint in (select address from pricet2)
    and swap_to_amount > 0
    and swap_from_amount > 0
    group by 1,2),

    hacktable as (
    select date_trunc(hour, block_timestamp) as hour_time,
    mint,
    label,
    address_name,
    tx_id,
    tx_from as victim,
    Run a query to Download Data