Skip to content
Advertisement

Tag: dense-rank

Dense_Rank does not work as it is expected

I’m creating a query where I need to get the ranking depending on how many are duplicated in the column “MacAddress”(amount) in the table MacsUsers, this is the data: this is my SQL query: I think I’m doing well with the DENSE_RANK function but it does not work as it is expected, any possible solution? thanks advance Answer Your DENSE_RANK

Calculate rank of the users based on their max score using mysql

I have a table (called users) I need rank of users based on their score but I want rank on the bases of users max score. Expect result Answer You are looking for DENSE_RANK, But it supports mysql version higher than 8.0 use correlated-subquery to get max value by each User_id use two variables one to store rank another to

Advertisement