Dynamic ranking & unique sorting