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);
date | usdc_withdrawals | dai_withdrawals | usdc_deposits | dai_deposits |
---|---|---|---|---|
2024-12-19 00:00:00+00 | 301050.55028100003 | 15000.007677847694 | 195497.87417600027 | 0 |
2024-12-20 00:00:00+00 | 831219.7718999999 | 1754175.6647566822 | 443802.5968199969 | 172055.07598289254 |
2024-12-21 00:00:00+00 | 19291.9881 | 0 | 5991.289448000001 | 0 |
2024-12-22 00:00:00+00 | 289335.35494 | 266.2540942501216 | 292516.0532400001 | 14639.26964466672 |
2024-12-23 00:00:00+00 | 326215.32056100015 | 108064.97609337467 | 982322.6232960018 | 15985.618878739298 |
2024-12-24 00:00:00+00 | 17250.38313800001 | 21.029655758419754 | 941334.0852600012 | 1010.96102 |
2024-12-25 00:00:00+00 | 415754.08363199944 | 51348.50034571012 | 186843.08222799993 | 71072.69095330061 |
2024-12-26 00:00:00+00 | 35595.76965700005 | 33913.49403940146 | 580738.2185079986 | 20321.22547509685 |
2024-12-27 00:00:00+00 | 8362.68606 | 35342.14636193089 | 120153.10571399998 | 46184.739332713194 |
2024-12-28 00:00:00+00 | 105523.82825599998 | 37319.819940200214 | 35971.98155999995 | 31542.100103171477 |
2025-01-02 00:00:00+00 | 495571.8273000005 | 6411973.189579002 | 559094.5669679998 | 8752.857445430962 |
2025-01-03 00:00:00+00 | 1394464.6221659996 | 36087238.47176634 | 1030812.8783759967 | 75430.40212315563 |
2025-01-04 00:00:00+00 | 4611.833618000002 | 2824.5147157249344 | 43881.44457000003 | 106037.50185974108 |
2025-01-05 00:00:00+00 | 87676.56979399998 | 249324.7919110678 | 153046.57678800003 | 100249.27456601505 |
2025-01-06 00:00:00+00 | 83699.14235400003 | 3113.747175053098 | 194860.11070800002 | 4109.956333315841 |
2025-01-07 00:00:00+00 | 0 | 67907.31100581739 | 0 | 0 |
2025-01-08 00:00:00+00 | 28742.779242000004 | 822344.9682909435 | 10597.944000000001 | 1094784.9406754612 |
2025-01-09 00:00:00+00 | 403692.4659459999 | 1098.5239555434969 | 36323.61671900004 | 571.1143560917476 |
2025-01-10 00:00:00+00 | 323142.2640599999 | 20.280413927182607 | 211861.46659500006 | 9.955210213459143 |
2025-01-12 00:00:00+00 | 618077.7017840001 | 415.34893807758186 | 3716.912538 | 20.584789457638614 |
2025-01-13 00:00:00+00 | 28555.408608 | 611.8471785780445 | 450618.58933700004 | 845.7328451662038 |
2025-01-14 00:00:00+00 | 65086.98345600002 | 142649.3882711382 | 1104281.0465199985 | 8066.948351581557 |
2025-01-15 00:00:00+00 | 196321.99590000007 | 5563.437353587664 | 784106.0166169996 | 398472.97279893694 |
2025-01-16 00:00:00+00 | 486372.86959500005 | 57651.69480807403 | 1705645.949881996 | 5539.292533682814 |
2025-01-17 00:00:00+00 | 535396.2614999999 | 246263.87261227693 | 227363.36349999995 | 298038.7514299613 |
2025-01-18 00:00:00+00 | 607630.7723730003 | 1748.7634110715176 | 144884.8175129998 | 2433.3919204017075 |
2025-01-19 00:00:00+00 | 1926746.2363380026 | 2318.8514227095147 | 212268.55487600015 | 0 |
2025-01-20 00:00:00+00 | 351771.8021860001 | 7416.560284130826 | 15757.605679999997 | 370.5827910195249 |
2025-01-21 00:00:00+00 | 578478.9962699999 | 2.9587057871623164 | 10428.945985 | 0.021051356693184285 |
2025-01-22 00:00:00+00 | 257653.19224400024 | 94597.39923614198 | 142048.961561 | 18212.46287954764 |
2025-01-23 00:00:00+00 | 1049352.3672479999 | 1206.3641740433166 | 433840.48039499973 | 858.4110448511269 |
2025-01-24 00:00:00+00 | 7879.813298 | 449.977123521835 | 27551.439844000004 | 1530.7514637359043 |
2025-01-26 00:00:00+00 | 0 | 41.77100203154721 | 0 | 0 |
2025-01-29 00:00:00+00 | 0.27471 | 9733.75444225484 | 0 | 0 |
2025-01-30 00:00:00+00 | 16675.413504 | 0 | 111797.00988500005 | 0 |
2025-01-31 00:00:00+00 | 1707329.650490998 | 12370.074911234484 | 75687.04437300001 | 1262.316738963104 |
2025-02-01 00:00:00+00 | 193431.65122799986 | 1206.016871435182 | 490413.62059799995 | 1778.1440228857646 |
2025-02-02 00:00:00+00 | 569944.3144159992 | 135.73960567016505 | 607451.2821599987 | 0 |
2025-02-03 00:00:00+00 | 1100088.747277 | 72488.7689837662 | 129043.72307500026 | 49470.176970943314 |
2025-02-04 00:00:00+00 | 3883.708653999999 | 14157.146965437769 | 1034855.4676839998 | 191.77405964076556 |
2025-02-05 00:00:00+00 | 14389.47241000001 | 625.7341843059445 | 47111.30399399998 | 0 |
2025-02-06 00:00:00+00 | 551.590389 | 18575.297364408758 | 6646.178057999999 | 26232.70069536168 |
2025-02-07 00:00:00+00 | 0 | 580.8433210567018 | 0 | 1087.1393995403955 |
2025-02-09 00:00:00+00 | 8033.905902000001 | 27.675589986218714 | 13713.543731999996 | 0 |
2025-02-10 00:00:00+00 | 657.393093 | 897.8319896121051 | 6641.112080000001 | 611.1889344318481 |
2025-02-13 00:00:00+00 | 27897.048432000003 | 2352.2090764975583 | 25190.117498 | 3437.6524834329375 |
2025-02-14 00:00:00+00 | 449981.0781750003 | 10340.681012718549 | 321274.70240000094 | 11860.810946843789 |
2025-02-15 00:00:00+00 | 1222.9027789999993 | 10.400295067688653 | 4929.236396 | 0 |
2025-02-16 00:00:00+00 | 1034.0426069999999 | 15.065227540197235 | 34461.637011 | 0 |
2025-02-17 00:00:00+00 | 94117.99406100002 | 3272.981196744722 | 31516.84607500001 | 3615.662039316798 |
2025-02-18 00:00:00+00 | 26775.783410000015 | 3552.6981087223803 | 24573.931888000036 | 4620.939881355241 |
2025-02-19 00:00:00+00 | 7983.943583999996 | 209.66415809501734 | 118804.88983500001 | 308.523673597598 |
2025-02-24 00:00:00+00 | 123971.191316 | 1620.0276786813502 | 56729.477839999985 | 1355.9425043514073 |
2025-02-25 00:00:00+00 | 326480.57097999996 | 21376.19154302564 | 35259.15450999997 | 3532.5315106839257 |
2025-02-26 00:00:00+00 | 92501.03798400001 | 1084.7907289576983 | 27513.923412000015 | 1084.790728958588 |
2025-02-27 00:00:00+00 | 113499.35205699998 | 24532.92456187182 | 8241.427440000003 | 2291.631885202667 |
2025-02-28 00:00:00+00 | 284710.46795400005 | 4376.209314001088 | 4376.751223999999 | 732.4531864676825 |
2025-03-02 00:00:00+00 | 4526.052624999999 | 678.3968765233826 | 1086.708965 | 0 |
2025-03-03 00:00:00+00 | 5148.928019999999 | 223976.6333037834 | 461369.2788079995 | 3836.1858117523 |
2025-03-04 00:00:00+00 | 391717.0420749999 | 1264813.9124124795 | 780921.9888320008 | 14286.683220896011 |
2025-03-05 00:00:00+00 | 22410.13723899999 | 2860.710315454106 | 942.513117 | 2860.7103154563683 |
2025-03-06 00:00:00+00 | 618235.6744069991 | 20202.186521521497 | 785796.8491449989 | 4352.443489522257 |
2025-03-07 00:00:00+00 | 10004.495877999996 | 5721.655392779315 | 6884.098739999999 | 202566.69102687069 |
2025-03-08 00:00:00+00 | 35649.760109999996 | 2418.134456375864 | 59255.36411999999 | 4230.821790912263 |
2025-03-09 00:00:00+00 | 43864.940175000025 | 299.9384190407291 | 23108.475059999975 | 879.870687946636 |
2025-03-10 00:00:00+00 | 580063.1962180003 | 12437.130672511243 | 729299.3030820019 | 222764.7996987462 |
2025-03-11 00:00:00+00 | 152807.24748299998 | 7187.06258284701 | 11032.417096999965 | 562335.3346172541 |
2025-03-12 00:00:00+00 | 103339.27555600005 | 4492.606300031214 | 71384.13368399999 | 170366.71077156506 |
2025-03-13 00:00:00+00 | 436906.5191599999 | 1599.0221726221655 | 8889.979572000007 | 39770.954712320454 |
2025-03-14 00:00:00+00 | 483307.15774800006 | 21439.08736424778 | 5390.722798999996 | 66061.97845604364 |
2025-03-15 00:00:00+00 | 1151.8370459999999 | 11741.74559665847 | 997.7974440000006 | 18856.56816514216 |
2025-03-16 00:00:00+00 | 703046.5236450006 | 93.59771618680672 | 53918.48319299996 | 30669.039766143556 |
2025-03-17 00:00:00+00 | 9227.241030000003 | 77463.919928107 | 2624770.936241998 | 90231.26359267836 |
2025-03-18 00:00:00+00 | 659466.3909539998 | 511.9047882932682 | 292996.19865000003 | 39160.04349115325 |
2025-03-19 00:00:00+00 | 183053.83245300013 | 23978.13560319177 | 23732.38622999999 | 134064.48376892705 |
2025-03-20 00:00:00+00 | 122497.99176999994 | 202999.67084752306 | 32611.58896799999 | 36768.239687217996 |
2025-03-21 00:00:00+00 | 26507.113959000017 | 489.32045643453245 | 25432.749700000022 | 20372.65593613941 |
2025-03-22 00:00:00+00 | 100599.34136200008 | 344.32772228030797 | 232170.93674399977 | 378.1938352985452 |
2025-03-23 00:00:00+00 | 125075.7961089999 | 840.8028298939091 | 2597.5517520000026 | 999.7176010433183 |
2025-03-24 00:00:00+00 | 901013.6670920003 | 2663.9789451304373 | 93437.25134400018 | 16266.373974094533 |
2025-03-25 00:00:00+00 | 6972.105425999992 | 360.2606121739157 | 41199.504864 | 623.6571203014594 |
2025-03-26 00:00:00+00 | 19796.07307200001 | 16542.213565037673 | 18878.548715999998 | 55.34042359399966 |
2025-03-27 00:00:00+00 | 4949.559700000001 | 45405.57450659616 | 74246.17040999998 | 12924.585637802318 |
2025-03-28 00:00:00+00 | 455823.9096120004 | 5890.481092361316 | 79610.91731999993 | 8092.390476281694 |
2025-03-29 00:00:00+00 | 2067.6084899999996 | 745.5185045448764 | 84664.72445199992 | 1076.2524484874348 |
2025-03-30 00:00:00+00 | 125312.01704800001 | 2645.742183918948 | 31219.13990000001 | 0 |
2025-03-31 00:00:00+00 | 240371.79124199995 | 9436.22383652577 | 1658.6827759999983 | 13996.431519000002 |
2025-04-01 00:00:00+00 | 2822.314096000002 | 950.0384548857043 | 30425.382371999985 | 0 |
2025-04-02 00:00:00+00 | 6323.857512 | 3.7517300873305666 | 13240.981218000004 | 9.061682339536421 |
2025-04-03 00:00:00+00 | 5862.006644999999 | 1090.9358828217742 | 12707.31628000001 | 1114.7848186032547 |
2025-04-04 00:00:00+00 | 84597.60946699997 | 325.1747680861133 | 16887.597736 | 95411.93109823111 |
2025-04-05 00:00:00+00 | 40532.01427499999 | 130793.85889085654 | 2593.745781000002 | 6790.210929302866 |
2025-04-06 00:00:00+00 | 358083.93198999984 | 129.91957751891343 | 138784.09451199992 | 50.78687381771609 |
2025-04-07 00:00:00+00 | 2569367.3772899993 | 531261.5808837634 | 181276.9358819999 | 40428.32259388857 |
2025-04-08 00:00:00+00 | 738.3424559999997 | 50364.60256150335 | 55633.555501999865 | 190.33521586093394 |
2025-04-09 00:00:00+00 | 18803.463110000004 | 18861.19533432425 | 227431.776702 | 1747.5161823117319 |
2025-04-10 00:00:00+00 | 381050.54075999965 | 3577.57476795108 | 253279.68613899974 | 3367.2930588209915 |
2025-04-11 00:00:00+00 | 64326.62847599999 | 2518.9874149349084 | 4411.477322000001 | 1018.1631315864391 |
2025-04-12 00:00:00+00 | 170843.46530999997 | 33.241788972431365 | 64157.423183999985 | 33.24178897260241 |
2025-04-13 00:00:00+00 | 215322.04643399993 | 7042.075647464456 | 181671.46694099985 | 0 |
2025-04-14 00:00:00+00 | 355409.4086509998 | 16825.07472185772 | 153487.6974179998 | 3894.089601471525 |
2025-04-15 00:00:00+00 | 379136.8147150407 | 49350.78665084108 | 1652210.1377978658 | 3380.562328047753 |
2025-04-16 00:00:00+00 | 53199.121388 | 5081.612562672672 | 128084.10599699995 | 761.7312813869074 |
2025-04-17 00:00:00+00 | 362466.92553000007 | 785.5723275407805 | 125562.18506000006 | 58.826177064277935 |
2025-04-18 00:00:00+00 | 13196.286036 | 792.6961551253182 | 48951.90529800004 | 141.44366229234268 |
2025-04-19 00:00:00+00 | 82971.17061300002 | 717.502349459855 | 44342.37871200007 | 717.5023494602708 |
2025-04-20 00:00:00+00 | 272728.3285100001 | 64.93173551836303 | 118241.71140599994 | 218125.7252919736 |
2025-04-21 00:00:00+00 | 31165.969023999976 | 1874.791031720026 | 7657.72650500001 | 1863.0815306688928 |
2025-04-22 00:00:00+00 | 96398.14886400006 | 192.56536725370484 | 31017.557961000002 | 585.3712249057253 |
2025-04-23 00:00:00+00 | 51506.41391799999 | 869.3400495566007 | 921336.4114239954 | 5807.60563676736 |
2025-04-24 00:00:00+00 | 91957.38714800007 | 49.38456498663028 | 251076.11623599994 | 0 |
2025-04-25 00:00:00+00 | 67593.80312400009 | 1115.9801747531387 | 2020.1899230000006 | 1580.9901064941832 |
2025-04-26 00:00:00+00 | 34001.283279999996 | 225.5057253956588 | 18165.755609999993 | 0 |
2025-04-27 00:00:00+00 | 15998.616084000008 | 821.069751359525 | 711396.7020630001 | 2423.639342746511 |
2025-04-28 00:00:00+00 | 53324.23803299994 | 11054.838718106635 | 52120.74567000005 | 0 |
2025-04-29 00:00:00+00 | 85220.49693600003 | 2519.3099759539095 | 165828.4476420001 | 1903.4125782505846 |
2025-04-30 00:00:00+00 | 39889.66313799998 | 96.25087406611404 | 45634.20553 | 96.25087406615437 |
2025-05-01 00:00:00+00 | 212274.25816799988 | 0 | 967231.5575399997 | 0 |
2025-05-02 00:00:00+00 | 20141.03908500001 | 42.81045603652869 | 24946.688599999987 | 42.81045603656213 |
2025-05-03 00:00:00+00 | 5403.738230999999 | 608.7214893187263 | 6541.083852000002 | 608.7214893192242 |
2025-05-04 00:00:00+00 | 157830.385528 | 75.11425090333587 | 811.7803430000007 | 158.74925543710182 |
2025-05-05 00:00:00+00 | 119945.37586000006 | 50.462176565454044 | 957.6954790000004 | 0 |
2025-05-06 00:00:00+00 | 106580.117091 | 426.99870090025934 | 1854.848040000001 | 426.99870090066486 |
2025-05-07 00:00:00+00 | 11878.40532 | 497.17503739230614 | 57821.65490399998 | 644.2805998516222 |
2025-05-08 00:00:00+00 | 1132807.259973999 | 37148.40925967407 | 20985.587316000023 | 1790.7140119857818 |
2025-05-09 00:00:00+00 | 45647.97766199998 | 1963.4844332240784 | 287491.14884400036 | 2331.29578378699 |
2025-05-10 00:00:00+00 | 5771.9613269999945 | 0.13205342627434427 | 11186.071489999993 | 0 |
2025-05-11 00:00:00+00 | 827.9551260000003 | 0 | 3330.0377319999993 | 0 |
2025-05-12 00:00:00+00 | 802016.947428 | 26.320324996519624 | 101628.45232799994 | 0 |
2025-05-13 00:00:00+00 | 30831.320429999996 | 3217.0659392671623 | 3738.011970000004 | 0 |
2025-05-14 00:00:00+00 | 67.285932 | 51.311909703078555 | 100.627239 | 0 |
2025-05-15 00:00:00+00 | 140052.15719599978 | 564.2133650900305 | 13698.808116000018 | 344.78685895032686 |
2025-05-16 00:00:00+00 | 6878.570507999999 | 0.788967797358464 | 1229.5171000000003 | 0 |
2025-05-17 00:00:00+00 | 21985.350096000006 | 64334.264196015865 | 47189.22896399999 | 10140.257450343463 |
2025-05-18 00:00:00+00 | 308133.7361440001 | 3297.5003071776473 | 4039.6610000000005 | 0 |
2025-05-19 00:00:00+00 | 567.9528959999999 | 0 | 1314.93213 | 0 |
2025-05-20 00:00:00+00 | 1845.6071760000007 | 10.186198531416046 | 178267.34504000007 | 22.04393349623663 |
2025-05-21 00:00:00+00 | 262960.49114399985 | 5143.971120050961 | 164029.76030399988 | 8080.743357206745 |
2025-05-22 00:00:00+00 | 223491.93386999998 | 14.375709624640105 | 8908.10613 | 0 |
2025-05-23 00:00:00+00 | 152767.2768159999 | 400.07911985431707 | 3579.881921000001 | 0 |
2025-05-24 00:00:00+00 | 313.909198 | 1126.8858800627481 | 238.05568799999992 | 1126.885880063005 |
2025-05-25 00:00:00+00 | 0 | 72961.8823140961 | 0 | 0 |
null | 0 | 0 | 603.367397 | 1594.6770884232199 |