I am trying to write a query to calculate total transaction fees paid in USD. For that I am writing the below query but somehow join messes things up.
SELECT
 date_trunc('minute',block_time),
   hash,
   (gas_used*gas_price/1e18) as total_price_in_eth
 FROM
   ethereum.transactions
   join 
   (select minute,price from prices.usd where symbol = 'ETH') as prices on date_trunc('minute',block_time) = minute
 WHERE
   "from" = xxxxxxxx
I am able to calculate total fees in gwei but I want to calculate transaction fees paid in USD. Can someone point me in right direction what I am doing wrong here?