Use aggregation in filtering skipped receipts

pull/42/head
CJ Bryan and Derek Barnes 7 years ago
parent 05f23c7882
commit 5bbd950195
  1. 3
      lib/explorer/skipped_receipts.ex

@ -15,7 +15,8 @@ defmodule Explorer.SkippedReceipts do
transaction in Transaction,
left_join: receipt in assoc(transaction, :receipt),
select: fragment("hash"),
where: is_nil(receipt.id),
group_by: transaction.id,
having: count(receipt.id) == 0,
limit: ^count
)

Loading…
Cancel
Save