fix duplicate entries

pull/2538/head
Ayrat Badykov 5 years ago
parent b8570df932
commit bd20d821bf
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 1
      apps/explorer/lib/explorer/chain/address/coin_balance.ex

@ -78,6 +78,7 @@ defmodule Explorer.Chain.Address.CoinBalance do
where: not is_nil(cb.value), where: not is_nil(cb.value),
inner_join: b in Block, inner_join: b in Block,
on: cb.block_number == b.number, on: cb.block_number == b.number,
distinct: cb.block_number,
order_by: [desc: :block_number], order_by: [desc: :block_number],
limit: ^page_size, limit: ^page_size,
select_merge: %{delta: fragment("value - coalesce(lag(value, 1) over (order by block_number), 0)")}, select_merge: %{delta: fragment("value - coalesce(lag(value, 1) over (order by block_number), 0)")},

Loading…
Cancel
Save