LB said dense_rank is more intuitive
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::{Backend, model::client::Client};
|
||||
use crate::{model::client::Client, Backend};
|
||||
|
||||
pub(crate) struct Rank {
|
||||
pub(crate) rank: i64,
|
||||
@@ -12,7 +12,7 @@ impl Backend {
|
||||
Backend::Sqlite(db) => {
|
||||
let rows = sqlx::query!(
|
||||
"SELECT
|
||||
RANK() OVER (ORDER BY COUNT(s.client_uuid) DESC) as rank,
|
||||
DENSE_RANK() OVER (ORDER BY COUNT(s.client_uuid) DESC) as rank,
|
||||
c.name,
|
||||
c.uuid,
|
||||
COUNT(s.client_uuid) as amount
|
||||
|
Reference in New Issue
Block a user