Skip to content

Commit

Permalink
Update balancer_cowswap_amm_ethereum_liquidity.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
viniabussafi authored Sep 3, 2024
1 parent b5367ef commit a385ff1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ WITH pool_labels AS (
eth_prices AS(
SELECT
date_trunc('day', minute) AS day,
AVG(price) AS eth_price
APPROX_PERCENTILE(price, 0.5) AS eth_price
FROM {{ source('prices', 'usd') }}
WHERE blockchain = '{{blockchain}}'
AND symbol = 'ETH'
AND contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
GROUP BY 1
),

Expand Down Expand Up @@ -82,4 +82,4 @@ SELECT
FROM cumulative_usd_balance c
LEFT JOIN pool_labels p ON p.address = c.pool_address
LEFT JOIN eth_prices e ON e.day = c.day
WHERE c.pool_address IS NOT NULL
WHERE c.pool_address IS NOT NULL

0 comments on commit a385ff1

Please sign in to comment.