Baselight
WITH swap_data AS (
  SELECT
    CAST(time AS DATE) AS activity_date,
    COUNT(*) AS swap_count,
    SUM(inputamount + outputamount) AS swap_volume
  FROM @portals.transactions.swaps
  WHERE inputtoken LIKE 'ethereum:%'
    AND outputtoken LIKE 'ethereum:%'
  GROUP BY activity_date
),

deposit_data AS (
  SELECT
    CAST(time AS DATE) AS activity_date,
    COUNT(*) AS deposit_count,
    SUM(amount) AS deposit_volume
  FROM @portals.transactions.deposits
  WHERE key LIKE 'ethereum:%'
  GROUP BY activity_date
),

withdraw_data AS (
  SELECT
    CAST(time AS DATE) AS activity_date,
    COUNT(*) AS withdrawal_count,
    SUM(amount) AS withdrawal_volume
  FROM @portals.transactions.withdraws
  WHERE key LIKE 'ethereum:%'
  GROUP BY activity_date
)

SELECT
  COALESCE(s.activity_date, d.activity_date, w.activity_date) AS date,
  s.swap_count,
  s.swap_volume,
  d.deposit_count,
  d.deposit_volume,
  w.withdrawal_count,
  w.withdrawal_volume
FROM swap_data s
FULL OUTER JOIN deposit_data d ON s.activity_date = d.activity_date
FULL OUTER JOIN withdraw_data w ON COALESCE(s.activity_date, d.activity_date) = w.activity_date
ORDER BY date;
dateswap_countswap_volumedeposit_countdeposit_volumewithdrawal_countwithdrawal_volume
2024-12-192145476.02576154672455394681.0064285835272297764.999249491
2024-12-2042290662.6645476375712610109379.5681836916335870920.52918234
2024-12-21718265.839593234803361906342.113901478234446331.639533545
2024-12-223163044.68112548343522021731.2112431738423745684.271901312
2024-12-231416762.76612942187637467419.3901303344218707424.068283077
2024-12-241635356.0257768536617728359.1081062695364410943.597379754
2024-12-2528264356.8175507064415455272126.243631066118647843.910781465
2024-12-261863945.49938452338418184976524.6421740426195445442.34711166
2024-12-272136188.172347832406627643034.7999198056526525464.495916385
2024-12-282477144.12469303413688802184.9396219449329851296.31860068
2025-01-02720577.031337697065453116547.4099760653269471399.60443175
2025-01-0332114288.653243659051047001192.7345050586226124886.25496039
2025-01-042144510.99093109224462885811.8487569813516175617.457869923
2025-01-051327558.130170193912757770465.411869183738130136.174486265
2025-01-061539672.0589877562127573420.0595738783172255569.239366312
2025-01-071653472.77341577088433408818.6144126294023679991.486927155
2025-01-082242318.815144521937216831624.6653143657958469325.820856094
2025-01-092170193.318241257424750655134.021245636846946153.69331015
2025-01-10129977.7273291815135511488600.1481895159432752861.2460814
2025-01-121032880.9278540197133602805.2549676045198491977.826208519
2025-01-1334316834.23593714385518978298.001132644022653543.78059156
2025-01-14531010872.886813345656262917.3293660555025870045.442659568
2025-01-1574455943.4182649989104145098.168381635954199256.52380658
2025-01-1648104301.00146674638821694758.281001419229843918.172255643
2025-01-1732456234.9347185824616027068.726136934313723137.75899872
2025-01-1814417602.99427783955303163961.875608435268381156.305947814
2025-01-191789285.674940011543910011434.277592205403971018.4202704234
2025-01-201133866.137155750075122448644.765260887142663492.4071445176
2025-01-211671666.64279287442121244609.3566349556103257941.38177698
2025-01-2281277888.10829323776015453092.877641203344069638.740837001
2025-01-2327257169.475450826374315714884.9304660472951149415.15111638
2025-01-2435476747.21492929297647380930.394787806211723598.730509549
2025-01-252590887.21658576516489632824.9645873552916121103.727902982
2025-01-2624112864.34694810213538981637.1383389982734482199.0515974
2025-01-2737562595.7803076832316435805.5950208324118296737.483777698
2025-01-28191319789.05665230242345705692.08374114549718.357552831
2025-01-2924420650.70357340475391168013.59165681553615681579.151432144
2025-01-3016867954.69869453723717967598.09346816381547981.9848855024
2025-01-3119390645.74491334194341959603.53472647297161503.618445524
2025-02-0119258226.2027194457877799049.711192539831776503.956837361
2025-02-0232432975.43569853617503944341.731780293610428896.249166513
2025-02-03442612669.39110980746822866256.997458267989216696.56899436
2025-02-041542411.15670290658254967954.3122906615419562791.485075783
2025-02-052083598.271164197014964637629.7238831674101390205.77013463
2025-02-064660052.56680583173381930836.0202711547749323367.57608078
2025-02-071826425.66722768049712240883.781456587284110270620.299033342
2025-02-092332498.76584785355623889669.41937249615018307395.76441538
2025-02-10740281.771760505006369333.664447110792427165998.998572785
2025-02-11nullnull715885.533778658353nullnull
2025-02-12nullnull281208991.613002202nullnull
2025-02-1319152128.32593373707311641447.771407747439116395.519974826
2025-02-1430148853.0714259424363128406.06332745179219419553.56306274
2025-02-1520197829.1184296865231846862.4272878538436348641.211304704
2025-02-162069213.7724103595821269255.5946224026171572374.6387651376
2025-02-1734224135.956333185085864276125.975788724822231589.4522662
2025-02-1872368743.152188066576545790272.196967626721155205.04725622
2025-02-1930138901.3253082587382977850.8222661934216539240.98958354
2025-02-2413132775.41487089955382736758.046111135357561913.896731134
2025-02-2538794856.3539521958813026963.198477681311133755519.285967655
2025-02-262652943.3527492193249011121508.673679624537303015.325271056
2025-02-272781189.2150935841610014717641.055011138195114451966.16537476
2025-02-2838334148.5332384493574478134.5415491618932912098.39113907
2025-03-021544326.495323506239391264.60502946974028731680.89133871
2025-03-0335156873.985259465588915710005.3834878476710157339.43154181
2025-03-0481146085.47250065702929686561.1956628158316076466.87688071
2025-03-052114416.763327389306714521573.401367164435583774.311984776
2025-03-062424022.707128519658753646726.871459795727243730.2366842
2025-03-072918850.13661870361481083324.85992040556721751625.416485503
2025-03-081350165.21335347024441165227.97644953584369694469.234680198
2025-03-092477432.518733692623910437724.0567975965713855036.919493422
2025-03-103783455.78544974615782671301.211048660310698597186.34448579
2025-03-113867737.03804401236802918101.0991394368812986324.471426506
2025-03-12369120.174554899095532479189.3385066736834979212.413668245
2025-03-132515126.114875577536551329283.54962048075215750260.049282698
2025-03-141250177.93508117681631540513.41647338254046105472.81415258
2025-03-1573515.647169925425347270262.33969021257414862634.01952192
2025-03-161728320.55471887919491059759.9966691714415970207.066009095
2025-03-171978164.7520847059844364620.059162077446031697265.946764227
2025-03-18137668.507688786238503067613.13509410066719851491.76164927
2025-03-192233006.3592334310644400647.96904631923811704589.00325385
2025-03-201720141.6726166831585215781047.1628815534917215322.135855168
2025-03-2139155.15688408988211984884.58758465566470294.3641851265

Share link

Anyone who has the link will be able to view this.