mirror of
https://github.com/FlipsideCrypto/polygon-models.git
synced 2026-02-06 13:22:04 +00:00
round in gold
This commit is contained in:
parent
bd4f981686
commit
3729892f6c
@ -33,7 +33,13 @@ SELECT
|
||||
token_symbol,
|
||||
amount_unadj,
|
||||
amount,
|
||||
amount_usd,
|
||||
ROUND(
|
||||
CASE
|
||||
WHEN amount_usd < 1e+15 THEN amount_usd
|
||||
ELSE NULL
|
||||
END,
|
||||
2
|
||||
) AS amount_usd,
|
||||
COALESCE (
|
||||
complete_bridge_activity_id,
|
||||
{{ dbt_utils.generate_surrogate_key(
|
||||
|
||||
@ -24,10 +24,26 @@ SELECT
|
||||
event_name,
|
||||
amount_in_unadj,
|
||||
amount_in,
|
||||
amount_in_usd,
|
||||
ROUND(
|
||||
CASE
|
||||
WHEN amount_out_usd IS NULL
|
||||
OR ABS((amount_in_usd - amount_out_usd) / NULLIF(amount_out_usd, 0)) > 0.75
|
||||
OR ABS((amount_in_usd - amount_out_usd) / NULLIF(amount_in_usd, 0)) > 0.75 THEN NULL
|
||||
ELSE amount_in_usd
|
||||
END,
|
||||
2
|
||||
) AS amount_in_usd,
|
||||
amount_out_unadj,
|
||||
amount_out,
|
||||
amount_out_usd,
|
||||
ROUND(
|
||||
CASE
|
||||
WHEN amount_in_usd IS NULL
|
||||
OR ABS((amount_out_usd - amount_in_usd) / NULLIF(amount_in_usd, 0)) > 0.75
|
||||
OR ABS((amount_out_usd - amount_in_usd) / NULLIF(amount_out_usd, 0)) > 0.75 THEN NULL
|
||||
ELSE amount_out_usd
|
||||
END,
|
||||
2
|
||||
) AS amount_out_usd,
|
||||
sender,
|
||||
tx_to,
|
||||
event_index,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user