Ranking functions return a ranking value for each row in a partition. Depending on the function that is used, some rows might receive the same value as other rows. Ranking functions are non-deterministic.
Questions tagged [ranking-functions]
193 questions
0
votes
3 answers
Get row number result in correct order?
I have a query to get JobRanking based on yearleftpost to get latest job followed by previous jobs worked.
select
c.id,
c.Fname,
cfe.JobYear,
cfe.YearLeftPost,
cfe.Iscurrentjob,
…

RKKK
- 37
- 7
0
votes
1 answer
output with different rows from different columns from the same SQL table
I'm trying to calculate running averages of past 4th month. So I need to get the 4th value of each month
month_date | Month 1 | Month 2 | Month 3| Month 4
---------------------------------------------
11 | 0 | 0 | 0 | 0
10 |…

dbA
- 5
- 2
0
votes
2 answers
How to give a ranking to rows based on multiple criteria against weighted factors?
I'm setting up an excel file that lets you input values, and then it will provide a ranking of 1 to 5 on each value, and then compare all values based on a set of weighted values.
It is a business problem that I'm struggling with because I somehow…

Ahnaf
- 45
- 3
0
votes
2 answers
How to bin data by thirds or quarters - Oracle SQL
I am working with a dataset that looks like the following:
| Part | OpenDays |
|:-----:|:--------:|
| ABB52 | 203 |
| ABB85 | 52 |
| ABB88 | 365 |
| ABB26 | 311 |
| ABB75 | 288 |
| ABB92 | 98 |
| ABB36 | 113 |
|…

artemis
- 6,857
- 11
- 46
- 99
0
votes
1 answer
Excel Formula Help - Cumulative Book of Business
I was hoping to get help with the attached workbook. The end goal is to be able to flag the Customers that make up up to 70% of the rep's cummulative activity. I've done this manually in column H but would like a solid formula to get this…

JCOLE
- 1
0
votes
0 answers
Ranking values of complex csv file (using python, pandas)
I have a big csv file with dates set as index (e.g. 2018-10-31 12:00) and multiple columns, 1 column 'orientation' lists room IDS (sting, e.g. N1001) and another column 'values' lists numeric values (float). What I would like to do is getting the…

Lis011235
- 3
- 7
0
votes
2 answers
Excel - Returning multiple unique queries from a range based on non-unique criteria, ie similar rank
I am stumped to find the right formula to accurately return the top three ranked outcomes from a range in all scenarios. When the rankings are not equal things are always fine, 1,2,3,4,5. However when the top 2 or 3 outcomes are tied for first…

p-we
- 43
- 5
0
votes
0 answers
Congnos Ranking lowest as Rank 1
I am having hard time to rank lowest average number as rank 1, currently it ranking highest average number as rank 1. My current formula see below,
rank([Total Average], [Store Number])
I want it like below picture. How should I do that? Any help…

PrasadD
- 77
- 1
- 9
0
votes
2 answers
Rank every x rows per group
I have a table for example (rank increase by one by every day):
Rank,day
1 ,sunday
1 ,sunday
1 ,sunday
1 ,sunday
2 ,monday
3 ,friday
and I want to add new column call 'group' that increase by 1 every 3 rows for each group.
for example:…

cas s3
- 23
- 3
0
votes
1 answer
Generate custom group ranking in sql
As posted, I am trying to generate group ranking based on Is_True_Mod column. Here Until next 1 comes, I want 1 group to be there. Please find expected output in SQL. Here in expected output, rows grouped based on Is_True_Mode column. Regular…

Niks
- 997
- 2
- 10
- 28
0
votes
2 answers
selecting specific occurrences from a group SQL
Data set looks like
id statusid statusdate
100 22 04/12/2016
100 22 04/14/2016
100 25 04/16/2016
100 25 04/17/2016
100 25 04/19/2016
100 22 04/22/2016
100 22 …

Itachiara
- 13
- 2
0
votes
1 answer
Ranking of 1048 scores in Excel (From 1 to 0)
As shown in the example image below, I have several columns with results from a social network analysis software. I am now looking for a way to assign a ranking, going from "1" for the highest score to "0" for the lowest, in between 0.9XX - 0.001.…

Marc Gillet
- 13
- 2
0
votes
1 answer
Scoring and Ranking the models in R
I am doing predictive modelling of Multivariate Time series Data in R using various models such as Arima, H2O.Randomforest, glmnet, lm and few other models.
I created a function to select a model of our choice and do prediction.
Model1 <-…

dhinar1991
- 831
- 5
- 21
- 40
0
votes
1 answer
How to connect Document Conversion Service with Watson Retrieval and Ranking
I have 100 pdf documents. I have used Watson document conversion service to convert pdf documents into JSON Answer Units. Now I need to train these documents.
I have written python code which needs JSON Answer Units and Document Relevency Score as…

Rehoboth
- 43
- 2
- 6
0
votes
2 answers
How to create a ranking algorithm for a game
I am creating a ranking formula for a game I am developing. I want to be able to find out who the best player is based on two criteria:
Time
Steps
There is a task T that each player has to complete. The idea is to complete it in minimum time and…

Stacy J
- 2,721
- 15
- 58
- 92