add function to be able to delete names

This commit is contained in:
2025-08-21 12:31:31 +02:00
parent c74500adfd
commit a0eddece86
8 changed files with 305 additions and 40 deletions

View File

@@ -37,11 +37,9 @@ impl Backend {
)
SELECT rank, name, uuid, amount
FROM ranked_clients
WHERE rank <= (
SELECT rank
FROM ranked_clients
ORDER BY rank
LIMIT 1 OFFSET 9
WHERE rank <= COALESCE(
(SELECT rank FROM ranked_clients ORDER BY rank LIMIT 1 OFFSET 9),
(SELECT MAX(rank) FROM ranked_clients)
)
ORDER BY rank, name"
)