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) struct Rank {
|
||||||
pub(crate) rank: i64,
|
pub(crate) rank: i64,
|
||||||
@@ -12,7 +12,7 @@ impl Backend {
|
|||||||
Backend::Sqlite(db) => {
|
Backend::Sqlite(db) => {
|
||||||
let rows = sqlx::query!(
|
let rows = sqlx::query!(
|
||||||
"SELECT
|
"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.name,
|
||||||
c.uuid,
|
c.uuid,
|
||||||
COUNT(s.client_uuid) as amount
|
COUNT(s.client_uuid) as amount
|
||||||
|
Reference in New Issue
Block a user