Baselight
SELECT
    DATE_TRUNC('day', w.time) AS date,
    SUM(CASE WHEN w.symbol = 'USDC' THEN w.amount ELSE 0 END) AS usdc_withdrawals,
    SUM(CASE WHEN w.symbol = 'DAI' THEN w.amount ELSE 0 END) AS dai_withdrawals,
    SUM(CASE WHEN d.symbol = 'USDC' THEN d.amount ELSE 0 END) AS usdc_deposits,
    SUM(CASE WHEN d.symbol = 'DAI' THEN d.amount ELSE 0 END) AS dai_deposits
FROM
    "@portals.transactions.withdraws" w
FULL OUTER JOIN
    "@portals.transactions.deposits" d ON DATE_TRUNC('day', w.time) = DATE_TRUNC('day', d.time) AND w.symbol = d.symbol
WHERE
    w.symbol IN ('USDC', 'DAI') OR d.symbol IN ('USDC', 'DAI')
GROUP BY
    DATE_TRUNC('day', w.time)
ORDER BY
    DATE_TRUNC('day', w.time);
dateusdc_withdrawalsdai_withdrawalsusdc_depositsdai_deposits
2024-12-19 00:00:00+00301050.5502810000315000.007677847694195497.874176000270
2024-12-20 00:00:00+00831219.77189999991754175.6647566822443802.5968199969172055.07598289254
2024-12-21 00:00:00+0019291.988105991.2894480000010
2024-12-22 00:00:00+00289335.35494266.2540942501216292516.053240000114639.26964466672
2024-12-23 00:00:00+00326215.32056100015108064.97609337467982322.623296001815985.618878739298
2024-12-24 00:00:00+0017250.3831380000121.029655758419754941334.08526000121010.96102
2024-12-25 00:00:00+00415754.0836319994451348.50034571012186843.0822279999371072.69095330061
2024-12-26 00:00:00+0035595.7696570000533913.49403940146580738.218507998620321.22547509685
2024-12-27 00:00:00+008362.6860635342.14636193089120153.1057139999846184.739332713194
2024-12-28 00:00:00+00105523.8282559999837319.81994020021435971.9815599999531542.100103171477
2025-01-02 00:00:00+00495571.82730000056411973.189579002559094.56696799988752.857445430962
2025-01-03 00:00:00+001394464.622165999636087238.471766341030812.878375996775430.40212315563
2025-01-04 00:00:00+004611.8336180000022824.514715724934443881.44457000003106037.50185974108
2025-01-05 00:00:00+0087676.56979399998249324.7919110678153046.57678800003100249.27456601505
2025-01-06 00:00:00+0083699.142354000033113.747175053098194860.110708000024109.956333315841
2025-01-07 00:00:00+00067907.3110058173900
2025-01-08 00:00:00+0028742.779242000004822344.968290943510597.9440000000011094784.9406754612
2025-01-09 00:00:00+00403692.46594599991098.523955543496936323.61671900004571.1143560917476
2025-01-10 00:00:00+00323142.264059999920.280413927182607211861.466595000069.955210213459143
2025-01-12 00:00:00+00618077.7017840001415.348938077581863716.91253820.584789457638614
2025-01-13 00:00:00+0028555.408608611.8471785780445450618.58933700004845.7328451662038
2025-01-14 00:00:00+0065086.98345600002142649.38827113821104281.04651999858066.948351581557
2025-01-15 00:00:00+00196321.995900000075563.437353587664784106.0166169996398472.97279893694
2025-01-16 00:00:00+00486372.8695950000557651.694808074031705645.9498819965539.292533682814
2025-01-17 00:00:00+00535396.2614999999246263.87261227693227363.36349999995298038.7514299613
2025-01-18 00:00:00+00607630.77237300031748.7634110715176144884.81751299982433.3919204017075
2025-01-19 00:00:00+001926746.23633800262318.8514227095147212268.554876000150
2025-01-20 00:00:00+00351771.80218600017416.56028413082615757.605679999997370.5827910195249
2025-01-21 00:00:00+00578478.99626999992.958705787162316410428.9459850.021051356693184285
2025-01-22 00:00:00+00257653.1922440002494597.39923614198142048.96156118212.46287954764
2025-01-23 00:00:00+001049352.36724799991206.3641740433166433840.48039499973858.4110448511269
2025-01-24 00:00:00+007879.813298449.97712352183527551.4398440000041530.7514637359043
2025-01-26 00:00:00+00041.7710020315472100
2025-01-29 00:00:00+000.274719733.7544422548400
2025-01-30 00:00:00+0016675.4135040111797.009885000050
2025-01-31 00:00:00+001707329.65049099812370.07491123448475687.044373000011262.316738963104
2025-02-01 00:00:00+00193431.651227999861206.016871435182490413.620597999951778.1440228857646
2025-02-02 00:00:00+00569944.3144159992135.73960567016505607451.28215999870
2025-02-03 00:00:00+001100088.74727772488.7689837662129043.7230750002649470.176970943314
2025-02-04 00:00:00+003883.70865399999914157.1469654377691034855.4676839998191.77405964076556
2025-02-05 00:00:00+0014389.47241000001625.734184305944547111.303993999980
2025-02-06 00:00:00+00551.59038918575.2973644087586646.17805799999926232.70069536168
2025-02-07 00:00:00+000580.843321056701801087.1393995403955
2025-02-09 00:00:00+008033.90590200000127.67558998621871413713.5437319999960
2025-02-10 00:00:00+00657.393093897.83198961210516641.112080000001611.1889344318481
2025-02-13 00:00:00+0027897.0484320000032352.209076497558325190.1174983437.6524834329375
2025-02-14 00:00:00+00449981.078175000310340.681012718549321274.7024000009411860.810946843789
2025-02-15 00:00:00+001222.902778999999310.4002950676886534929.2363960
2025-02-16 00:00:00+001034.042606999999915.06522754019723534461.6370110
2025-02-17 00:00:00+0094117.994061000023272.98119674472231516.846075000013615.662039316798
2025-02-18 00:00:00+0026775.7834100000153552.698108722380324573.9318880000364620.939881355241
2025-02-19 00:00:00+007983.943583999996209.66415809501734118804.88983500001308.523673597598
2025-02-24 00:00:00+00123971.1913161620.027678681350256729.4778399999851355.9425043514073
2025-02-25 00:00:00+00326480.5709799999621376.1915430256435259.154509999973532.5315106839257
2025-02-26 00:00:00+0092501.037984000011084.790728957698327513.9234120000151084.790728958588
2025-02-27 00:00:00+00113499.3520569999824532.924561871828241.4274400000032291.631885202667
2025-02-28 00:00:00+00284710.467954000054376.2093140010884376.751223999999732.4531864676825
2025-03-02 00:00:00+004526.052624999999678.39687652338261086.7089650
2025-03-03 00:00:00+005148.928019999999223976.6333037834461369.27880799953836.1858117523
2025-03-04 00:00:00+00391717.04207499991264813.9124124795780921.988832000814286.683220896011
2025-03-05 00:00:00+0022410.137238999992860.710315454106942.5131172860.7103154563683
2025-03-06 00:00:00+00618235.674406999120202.186521521497785796.84914499894352.443489522257
2025-03-07 00:00:00+0010004.4958779999965721.6553927793156884.098739999999202566.69102687069
2025-03-08 00:00:00+0035649.7601099999962418.13445637586459255.364119999994230.821790912263
2025-03-09 00:00:00+0043864.940175000025299.938419040729123108.475059999975879.870687946636
2025-03-10 00:00:00+00580063.196218000312437.130672511243729299.3030820019222764.7996987462
2025-03-11 00:00:00+00152807.247482999987187.0625828470111032.417096999965562335.3346172541
2025-03-12 00:00:00+00103339.275556000054492.60630003121471384.13368399999170366.71077156506
2025-03-13 00:00:00+00436906.51915999991599.02217262216558889.97957200000739770.954712320454
2025-03-14 00:00:00+00483307.1577480000621439.087364247785390.72279899999666061.97845604364
2025-03-15 00:00:00+001151.837045999999911741.74559665847997.797444000000618856.56816514216
2025-03-16 00:00:00+00703046.523645000693.5977161868067253918.4831929999630669.039766143556
2025-03-17 00:00:00+009227.24103000000377463.9199281072624770.93624199890231.26359267836
2025-03-18 00:00:00+00659466.3909539998511.9047882932682292996.1986500000339160.04349115325
2025-03-19 00:00:00+00183053.8324530001323978.1356031917723732.38622999999134064.48376892705
2025-03-20 00:00:00+00122497.99176999994202999.6708475230632611.5889679999936768.239687217996
2025-03-21 00:00:00+0026507.113959000017489.3204564345324525432.74970000002220372.65593613941
2025-03-22 00:00:00+00100599.34136200008344.32772228030797232170.93674399977378.1938352985452
2025-03-23 00:00:00+00125075.7961089999840.80282989390912597.5517520000026999.7176010433183
2025-03-24 00:00:00+00901013.66709200032663.978945130437393437.2513440001816266.373974094533
2025-03-25 00:00:00+006972.105425999992360.260612173915741199.504864623.6571203014594
2025-03-26 00:00:00+0019796.0730720000116542.21356503767318878.54871599999855.34042359399966
2025-03-27 00:00:00+004949.55970000000145405.5745065961674246.1704099999812924.585637802318
2025-03-28 00:00:00+00455823.90961200045890.48109236131679610.917319999938092.390476281694
2025-03-29 00:00:00+002067.6084899999996745.518504544876484664.724451999921076.2524484874348
2025-03-30 00:00:00+00125312.017048000012645.74218391894831219.139900000010
2025-03-31 00:00:00+00240371.791241999959436.223836525771658.682775999998313996.431519000002
2025-04-01 00:00:00+002822.314096000002950.038454885704330425.3823719999850
2025-04-02 00:00:00+006323.8575123.751730087330566613240.9812180000049.061682339536421
2025-04-03 00:00:00+005862.0066449999991090.935882821774212707.316280000011114.7848186032547
2025-04-04 00:00:00+0084597.60946699997325.174768086113316887.59773695411.93109823111
2025-04-05 00:00:00+0040532.01427499999130793.858890856542593.7457810000026790.210929302866
2025-04-06 00:00:00+00358083.93198999984129.91957751891343138784.0945119999250.78687381771609
2025-04-07 00:00:00+002569367.3772899993531261.5808837634181276.935881999940428.32259388857
2025-04-08 00:00:00+00738.342455999999750364.6025615033555633.555501999865190.33521586093394
2025-04-09 00:00:00+0018803.46311000000418861.19533432425227431.7767021747.5161823117319
2025-04-10 00:00:00+00381050.540759999653577.57476795108253279.686138999743367.2930588209915
2025-04-11 00:00:00+0064326.628475999992518.98741493490844411.4773220000011018.1631315864391
2025-04-12 00:00:00+00170843.4653099999733.24178897243136564157.42318399998533.24178897260241
2025-04-13 00:00:00+00215322.046433999937042.075647464456181671.466940999850
2025-04-14 00:00:00+00355409.408650999816825.07472185772153487.69741799983894.089601471525
2025-04-15 00:00:00+00379136.814715040749350.786650841081652210.13779786583380.562328047753
2025-04-16 00:00:00+0053199.1213885081.612562672672128084.10599699995761.7312813869074
2025-04-17 00:00:00+00362466.92553000007785.5723275407805125562.1850600000658.826177064277935
2025-04-18 00:00:00+0013196.286036792.696155125318248951.90529800004141.44366229234268
2025-04-19 00:00:00+0082971.17061300002717.50234945985544342.37871200007717.5023494602708
2025-04-20 00:00:00+00272728.328510000164.93173551836303118241.71140599994218125.7252919736
2025-04-21 00:00:00+0031165.9690239999761874.7910317200267657.726505000011863.0815306688928
2025-04-22 00:00:00+0096398.14886400006192.5653672537048431017.557961000002585.3712249057253
2025-04-23 00:00:00+0051506.41391799999869.3400495566007921336.41142399545807.60563676736
2025-04-24 00:00:00+0091957.3871480000749.38456498663028251076.116235999940
2025-04-25 00:00:00+0067593.803124000091115.98017475313872020.18992300000061580.9901064941832
2025-04-26 00:00:00+0034001.283279999996225.505725395658818165.7556099999930
2025-04-27 00:00:00+0015998.616084000008821.069751359525711396.70206300012423.639342746511
2025-04-28 00:00:00+0053324.2380329999411054.83871810663552120.745670000050
2025-04-29 00:00:00+0085220.496936000032519.3099759539095165828.44764200011903.4125782505846
2025-04-30 00:00:00+0039889.6631379999896.2508740661140445634.2055396.25087406615437
2025-05-01 00:00:00+00212274.258167999880967231.55753999970
2025-05-02 00:00:00+0020141.0390850000142.8104560365286924946.68859999998742.81045603656213
2025-05-03 00:00:00+005403.738230999999608.72148931872636541.083852000002608.7214893192242
2025-05-04 00:00:00+00157830.38552875.11425090333587811.7803430000007158.74925543710182
2025-05-05 00:00:00+00119945.3758600000650.462176565454044957.69547900000040
2025-05-06 00:00:00+00106580.117091426.998700900259341854.848040000001426.99870090066486
2025-05-07 00:00:00+0011878.40532497.1750373923061457821.65490399998644.2805998516222
2025-05-08 00:00:00+001132807.25997399937148.4092596740720985.5873160000231790.7140119857818
2025-05-09 00:00:00+0045647.977661999981963.4844332240784287491.148844000362331.29578378699
2025-05-10 00:00:00+005771.96132699999450.1320534262743442711186.0714899999930
2025-05-11 00:00:00+00827.955126000000303330.03773199999930
2025-05-12 00:00:00+00802016.94742826.320324996519624101628.452327999940
2025-05-13 00:00:00+0030831.3204299999963217.06593926716233738.0119700000040
2025-05-14 00:00:00+0067.28593251.311909703078555100.6272390
2025-05-15 00:00:00+00140052.15719599978564.213365090030513698.808116000018344.78685895032686
2025-05-16 00:00:00+006878.5705079999990.7889677973584641229.51710000000030
2025-05-17 00:00:00+0021985.35009600000664334.26419601586547189.2289639999910140.257450343463
2025-05-18 00:00:00+00308133.73614400013297.50030717764734039.66100000000050
2025-05-19 00:00:00+00567.952895999999901314.932130
2025-05-20 00:00:00+001845.607176000000710.186198531416046178267.3450400000722.04393349623663
2025-05-21 00:00:00+00262960.491143999855143.971120050961164029.760303999888080.743357206745
2025-05-22 00:00:00+00223491.9338699999814.3757096246401058908.106130
2025-05-23 00:00:00+00152767.2768159999400.079119854317073579.8819210000010
2025-05-24 00:00:00+00313.9091981126.8858800627481238.055687999999921126.885880063005
2025-05-25 00:00:00+00072961.882314096100
null00603.3673971594.6770884232199

Share link

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