From 43b350dddbfdced6d2d913610241d9a5fc7a6f35 Mon Sep 17 00:00:00 2001 From: Alex Weseley Date: Fri, 8 Nov 2024 13:01:55 -0500 Subject: [PATCH] fixing up sql --- .../gmx/raw/fact_gmx_perps_token_prices.sql | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/models/projects/gmx/raw/fact_gmx_perps_token_prices.sql b/models/projects/gmx/raw/fact_gmx_perps_token_prices.sql index 48d69bc7..78063339 100644 --- a/models/projects/gmx/raw/fact_gmx_perps_token_prices.sql +++ b/models/projects/gmx/raw/fact_gmx_perps_token_prices.sql @@ -9,4 +9,15 @@ ) }} -SELECT * FROM {{ ref('fact_gmx_all_versions_trades') }} \ No newline at end of file +SELECT + block_timestamp, + tx_hash, + t1.chain, + 'gmx' as app, + tracked_metadata.symbol, + price, + token_address +FROM {{ ref('fact_gmx_all_versions_trades') }} t1 +inner join {{ref('wrapped_token_majors_by_chain')}} tracked_metadata + on lower(t1.token_address) = lower(tracked_metadata.contract_address) + and t1.chain = tracked_metadata.chain