Add average fee delta to pool ranking
Co-authored-by: mononaut <83316221+mononaut@users.noreply.github.com>
This commit is contained in:
1 parent
3d33233e51
commit
9e5d10b15f
6 files changed
+28
-4
No files matched your search
@@ -39,7 +39,8 @@ class PoolsRepository {
|
||||
pools.name AS name,
|
||||
pools.link AS link,
|
||||
slug,
|
||||
AVG(blocks_audits.match_rate) AS avgMatchRate
|
||||
AVG(blocks_audits.match_rate) AS avgMatchRate,
|
||||
AVG((CAST(blocks.fees as SIGNED) - CAST(blocks_audits.expected_fees as SIGNED)) / NULLIF(CAST(blocks_audits.expected_fees as SIGNED), 0)) AS avgFeeDelta
|
||||
FROM blocks
|
||||
JOIN pools on pools.id = pool_id
|
||||
LEFT JOIN blocks_audits ON blocks_audits.height = blocks.height
|
||||
|
||||
Reference in new issue
Block a user