shreexminimal-black
    Updated 4 days ago
    WITH a1 AS (
    SELECT
    SWAPPER,
    COUNT(*) AS buy_tx_count, -- Number of buy transactions
    SUM(SWAP_TO_AMOUNT) AS total_bought_tokens, -- Total tokens bought
    SUM(SWAP_TO_AMOUNT_USD) AS total_bought_usd, -- Total USD spent
    AVG(SWAP_TO_AMOUNT_USD / SWAP_TO_AMOUNT) AS avg_buy_price, -- Average buy price
    MIN(block_timestamp) AS first_buy_time, -- First buy time
    MAX(block_timestamp) AS last_buy_time -- Last buy time
    FROM solana.defi.ez_dex_swaps
    WHERE
    swap_to_mint = 'Dfh5DzRgSvvCFDoYc2ciTkMrbDfRKybA4SoFbPmApump'
    and swap_from_mint = 'So11111111111111111111111111111111111111112'
    AND swap_to_amount >= 10000
    GROUP BY swapper
    having count(*) <= 30
    ),

    a2 AS (
    SELECT
    s.swapper,
    COUNT(*) AS sell_tx_count, -- Number of sell transactions
    SUM(s.swap_from_amount) AS total_sold_tokens, -- Total tokens sold
    SUM(s.swap_from_amount_usd) AS total_sold_usd, -- Total USD gained
    AVG(s.swap_from_amount_usd / s.swap_from_amount) AS avg_sell_price, -- Average sell price
    MIN(s.block_timestamp) AS first_sell_time, -- First sell time
    MAX(s.block_timestamp) AS last_sell_time -- Last sell time
    FROM solana.defi.ez_dex_swaps s
    WHERE
    s.swap_from_mint = 'Dfh5DzRgSvvCFDoYc2ciTkMrbDfRKybA4SoFbPmApump'
    AND s.swap_to_mint = 'So11111111111111111111111111111111111111112'
    AND s.swapper IN (SELECT swapper FROM a1)
    AND s.swap_from_amount >= 1000
    GROUP BY s.swapper
    )
    Last run: 4 days ago
    SWAPPER
    TOTAL_BUY_TRANSACTIONS
    TOTAL_BOUGHT_TOKENS
    TOTAL_BOUGHT_USD
    AVG_BUY_PRICE
    FIRST_BUY_TIME
    LAST_BUY_TIME
    TOTAL_SELL_TRANSACTIONS
    TOTAL_SOLD_TOKENS
    TOTAL_SOLD_USD
    AVG_SELL_PRICE
    FIRST_SELL_TIME
    LAST_SELL_TIME
    NET_PROFIT_USD
    PROFIT_PERCENTAGE
    HOLDING_PERIOD_HOURS
    1
    DP7LHCeGvodfzmcwbhwy9K5CvGQYFH1mhnhqAy4sJvDF5799970.62903443045.720.067330372572024-11-10 15:51:08.0002025-01-15 02:03:38.00041199755.834059140710.410.10067977962024-11-18 12:44:56.0002025-01-18 07:07:11.00097664.69226.89-1381.311667
    2
    A9RJ7QGD9PKCA7PHQqnrdABat74eSrKfwveptfdU6MV522893991.842331151006.980.16795283932025-01-10 00:13:57.0002025-01-13 11:53:20.00021921150.002291246670.590.26489757112025-01-11 04:54:15.0002025-01-14 02:42:33.00095663.6163.35-54.984722
    3
    2pZ9csr5caBXuEGw4KRpn8dmWV7aDEKzjTRmT4TwYd621523290.6326119918.690.038064296892025-01-05 11:23:28.0002025-01-05 11:23:28.00015674583.89504115196.670.16701842262025-01-10 05:11:10.0002025-01-15 22:19:26.00095277.98478.33113.795
    4
    43S5gbuHtC3UQxhdEzJpts1S1afmCqoGUEFx5iUhMznM10442858.05708656031.060.16313373252024-11-10 15:00:29.0002025-01-14 16:13:33.000232508493.288499151028.780.10360926912024-11-11 06:15:17.0002025-01-20 01:18:48.00094997.72169.54-1545.971111
    5
    EKrHFVxPi4JG6iZLSxQY94VzM5ByiLCeLKhYt7hrNRAA4170785.13029813153.360.10259137532024-11-13 07:07:02.0002025-01-21 13:15:25.00012523631.764594106808.80.17420455452024-12-11 05:18:40.0002025-01-18 22:25:02.00093655.44712.03-991.945833
    6
    9tM3TdjHnYprGxTg3bwV9NkaD7hDsjJHtLfMBNCLjixQ26892760.14978177137.790.10762195112024-11-14 19:12:23.0002025-01-20 13:24:37.000481286712.950746170015.960.14172263632024-11-15 14:15:57.0002025-01-22 03:04:03.00092878.17120.41-1583.144444
    7
    1fJwdVNtTQj79X8WWR2VUvANXtfmyKrmA6hA3GPAssj74346348.844666376561.240.1321089372025-01-06 01:37:00.0002025-01-14 14:16:23.000103501980.327607469189.290.16678288072025-01-08 07:53:49.0002025-01-15 10:41:13.00092628.0524.6-150.376111
    8
    DF9uKTeq9qvhCr6kYmimsAddR6JBgUXLTrkhZpwfC2m9191096282.442911155538.560.1598779072025-01-11 05:05:48.0002025-01-21 04:29:00.000251867118.458061247239.950.1381872452025-01-10 08:21:09.0002025-01-22 02:33:23.00091701.3958.96-260.130833
    9
    9mpfuJQfnfzt2yg4ftX2YunbEediN7SpgSsfqb2VwrxW4905722.26491238174.120.04214771012025-01-08 21:20:36.0002025-01-08 21:23:25.0005775458.460999129678.460.16665620772025-01-09 19:37:52.0002025-01-14 15:34:50.00091504.34239.722.240833
    10
    85DQgGZvcjYyAw3a1s6rW68Cci4sXGskLcYCwWGsgtGX306255466.724147273272.150.095131431752024-11-10 08:48:52.0002025-01-19 04:31:46.000335849742.928752364638.340.0980217532024-11-10 23:06:44.0002025-01-19 14:15:43.00091366.1933.43-1661.417222
    11
    EnGZBjDA5tTkcX8SHLa6mEqty22tV7NpdWAKB9r7U5pi81406922.10644795168.30.070136051982025-01-06 10:02:02.0002025-01-20 23:23:01.00091791622.721811185243.550.097404325282025-01-08 03:19:37.0002025-01-21 02:06:53.00090075.2594.65-308.056667
    12
    B7GUagwjdMAYSQV2R9KKZzSHfyzopzntbBZthnkxtuzf7472074.0926346618.330.11597001442025-01-09 08:40:48.0002025-01-12 18:38:00.0005750100.552043136145.540.18150280012025-01-14 10:25:36.0002025-01-14 11:26:04.00089527.21192.0439.793333
    13
    2rhi87aYyWSu2ny8QWT5igYJDgETsLSx7qRPoMpiktjV201912819.09939299430.90.058532246342025-01-05 05:11:19.0002025-01-20 16:34:05.000231381697.930919188669.590.13671901582025-01-09 01:40:51.0002025-01-22 01:00:56.00089238.6989.75-278.887222
    14
    9HpafQ2C2f5nyMVpZfEnYJJw5KMsa3caDX5ScpSM4X7H192096738.18617780568.450.061617940742024-11-11 00:59:18.0002025-01-20 04:05:26.000243192925.705332167414.830.074377451682024-11-12 14:01:40.0002025-01-19 22:01:27.00086846.38107.79-1646.062778
    15
    FED6TcDA7yHKyc7JUdGux1vubtRYxd1zNAmLZzMokmLs12440917.67761869269.850.16126709562025-01-12 23:52:23.0002025-01-16 14:05:16.00015921468.660015153240.240.16594527772025-01-16 19:50:54.0002025-01-17 05:49:26.00083970.39121.225.760556
    16
    5UsfME3NbdUrEPLGiC5fBE98dqtEgWBdwJUg1tspX2cR221036995.021975136844.720.18890724392024-11-10 22:39:02.0002025-01-13 22:31:12.000361386103.632465220562.50.19857008292024-11-11 10:51:10.0002025-01-15 08:08:33.00083717.7861.18-1523.667222
    17
    3hyKAcCW6GXyhwDeRAUtSUpzGnupdMQMRNKZexcYpeuo33029012.76872523027.550.0076003193522024-12-22 20:56:54.0002024-12-22 21:10:35.0004713031.101556105563.820.15630824762025-01-09 20:33:24.0002025-01-11 22:47:34.00082536.27358.42431.380278
    18
    X9KqjqzjDpArmwhJR2Pvqh2GYWvdC8cNd91fnubp2tn2199172.09745727547.480.13946452972025-01-09 20:17:13.0002025-01-09 21:03:04.0003494337.192023109805.880.22480434162025-01-11 22:00:53.0002025-01-14 02:21:06.00082258.4298.6148.963611
    19
    B2J19ej5iHCND6MWZwaMqYvQo7kjD83qsjEoUUWCTAWn2118088.58352915426.240.1294394972025-01-18 22:49:30.0002025-01-19 21:43:55.00010553348.58700497532.170.17599726672025-01-09 17:52:52.0002025-01-22 05:15:35.00082105.93532.25-243.850833
    20
    4y1N1usHNcLBBTomnCG3yLQCiADfpuSGF9efe7vSLw4C183145931.156038171150.140.14348074542024-11-10 20:13:19.0002025-01-12 18:40:24.000332282462.591374252391.120.15876259662024-11-15 00:41:49.0002025-01-21 15:21:47.00081240.9847.47-1409.976389
    ...
    3397
    837KB
    19s