Skip to content

Commit

Permalink
fix ambiguous decimals for prices (#1257)
Browse files Browse the repository at this point in the history
Brief comments on the purpose of your changes:


*For Dune Engine V2*
I've checked that:

* [ ] I tested the query on dune.com after compiling the model with dbt compile (compiled queries are written to the target directory)
* [ ] I used "refs" to reference other models in this repo and "sources" to reference raw or decoded tables 
* [ ] if adding a new model, I added a test
* [ ] the filename is unique and ends with .sql
* [ ] each sql file is a select statement and has only one view, table or function defined  
* [ ] column names are `lowercase_snake_cased`

When you are ready for a review, tag duneanalytics/data-experience. We will re-open your forked pull request as an internal pull request. Then your spells will run in dbt and the logs will be avaiable in Github Actions DBT Slim CI. This job will only run the models and tests changed by your PR compared to the production project.
  • Loading branch information
soispoke authored Jul 7, 2022
1 parent 0e4d090 commit d71ba02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spellbook/models/opensea/ethereum/opensea_ethereum_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ evt_tx_hash || '-' || evt_index::string as unique_trade_id,
'ethereum' as blockchain,
evt_tx_hash as tx_hash,
evt_block_time as block_time,
om.price / power(10, decimals) * p.price AS amount_usd,
om.price / power(10, decimals) AS amount,
om.price / power(10, p.decimals) * p.price AS amount_usd,
om.price / power(10, p.decimals) AS amount,
om.price AS amount_raw,
terc20.symbol as token_symbol,
wam.token_address as token_address,
Expand Down

0 comments on commit d71ba02

Please sign in to comment.