mirror of
https://github.com/alexgo-io/gaze-indexer.git
synced 2026-01-12 08:34:28 +08:00
fix: order get ongoing tokens by mint transactions (#66)
This commit is contained in:
@@ -103,8 +103,7 @@ SELECT * FROM runes_entries
|
||||
@search::text = '' OR
|
||||
runes_entries.rune ILIKE '%' || @search::text || '%'
|
||||
)
|
||||
ORDER BY (COALESCE(runes_entries.premine, 0) + COALESCE(runes_entries.terms_amount, 0) * COALESCE(states.mints, 0)) /
|
||||
(COALESCE(runes_entries.premine, 0) + COALESCE(runes_entries.terms_amount, 0) * COALESCE(runes_entries.terms_cap, 0))::float DESC
|
||||
ORDER BY states.mints DESC
|
||||
LIMIT @_limit OFFSET @_offset;
|
||||
|
||||
-- name: GetRuneIdFromRune :one
|
||||
|
||||
@@ -292,8 +292,7 @@ SELECT runes_entries.rune_id, number, rune, spacers, premine, symbol, divisibili
|
||||
$2::text = '' OR
|
||||
runes_entries.rune ILIKE '%' || $2::text || '%'
|
||||
)
|
||||
ORDER BY (COALESCE(runes_entries.premine, 0) + COALESCE(runes_entries.terms_amount, 0) * COALESCE(states.mints, 0)) /
|
||||
(COALESCE(runes_entries.premine, 0) + COALESCE(runes_entries.terms_amount, 0) * COALESCE(runes_entries.terms_cap, 0))::float DESC
|
||||
ORDER BY states.mints DESC
|
||||
LIMIT $4 OFFSET $3
|
||||
`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user