From 6a29a81829857140e05efda3013c43ba4dc5d3dc Mon Sep 17 00:00:00 2001 From: green-jay Date: Wed, 21 Feb 2024 17:56:54 +0100 Subject: [PATCH] fix volumes --- queries/defillama/v1/volume.sql | 5 ++++- queries/hydradx-ui/v2/stats/volume.sql | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/queries/defillama/v1/volume.sql b/queries/defillama/v1/volume.sql index 022f48d..f13230d 100644 --- a/queries/defillama/v1/volume.sql +++ b/queries/defillama/v1/volume.sql @@ -13,7 +13,8 @@ SELECT FROM ( SELECT symbol, - volume_roll_24_usd, + volume_roll_24_usd, + timestamp, ROW_NUMBER() OVER ( PARTITION BY symbol ORDER BY timestamp DESC @@ -30,3 +31,5 @@ FROM ( ) a WHERE rn = 1 +AND + timestamp > now () - interval '1d' \ No newline at end of file diff --git a/queries/hydradx-ui/v2/stats/volume.sql b/queries/hydradx-ui/v2/stats/volume.sql index 5fb0e3e..c3d7ac2 100644 --- a/queries/hydradx-ui/v2/stats/volume.sql +++ b/queries/hydradx-ui/v2/stats/volume.sql @@ -10,6 +10,7 @@ FROM ( symbol, asset_id, volume_roll_24_usd, + timestamp, ROW_NUMBER() OVER ( PARTITION BY symbol ORDER BY timestamp DESC @@ -26,4 +27,6 @@ FROM ( ) a WHERE rn = 1 +AND + timestamp > now () - interval '1d' GROUP BY 1 \ No newline at end of file