473,320 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Fix Ranking Query

1
In the query, ties are given the same rank:

1.Salesperson Division NumberSold Rank
2. Robert Electronics 99 2
3. Jenny Electronics 54 4
4. Billy Appliances 54 4
5. Karen Appliances 102 1
6. Kim Appliances 30 5

So in this case Jenny and Billy are both ranked 4.
But actually they should both be ranked 3
Then nobody is 4 and Kim is 5.

Any fast way of fixing this ?

Thanks for the great post though !
Dec 16 '15 #1
4 956
Rabbit
12,516 Expert Mod 8TB
Take out the equal sign and add one to the count.
Dec 16 '15 #2
zmbd
5,501 Expert Mod 4TB
Relocated this post from Rabbit's insight article located at:
Ranking Queries in MS Access SQL

If you are still having issues with this after Rabbit's suggestion we may need to see your SQL.
Dec 17 '15 #3
NeoPa
32,556 Expert Mod 16PB
Hi Rabbit.

You may want to update your article to incorporate this. Pipi's point is a good one. Two equal values that are both less than the top two values are generally given a ranking of 3 and not 4.
Dec 18 '15 #4
Rabbit
12,516 Expert Mod 8TB
Good idea, I'll do so
Dec 19 '15 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Irene | last post by:
Hi all again, Well, I have my Athletics database with Athletes, Competitions, Scores tables. I have a ranking query where I get back the list of the competitions-athletes and scores...
5
by: ED | last post by:
I currently have vba code that ranks employees based on their average job time ordered by their region, zone, and job code. I currently have vba code that will cycle through a query and ranks each...
9
by: blue875 | last post by:
I've seen this asked several times, but never a straight answer. I have a query returning a set of sorted rows. Let's say I get back: Alice Bob Charlie I want to add a number ranking, so it...
5
by: valglad | last post by:
Hi, The question below was posted about 4 years ago and noone was able to answer it back then. I have virtually the same type of problem so would appreciate if anyone can help. Thanks ...
6
by: sara | last post by:
I hope someone can help with this. Our director wants to have a report that will have the departments (Retail stores) across the top, stores down the side and the RANKING of the YTD dept sales...
0
by: sipacate | last post by:
I've got a ranking query that ranks the performance of teams in challenges. The hierarchy of data is as follows: teams have members members have activities activities have activitytypes...
1
by: Dave Smith | last post by:
I’m looking for help on being able to speed up my Ranking query. Below are a couple of my Rank formulas. And way below is what I copied from access sql. How would I clean it up so my query will run...
4
by: Bryan Guirnela | last post by:
Hi guys, I am Trying to create a ranking query which will rank the the dates on the table if the name and offense matches. Name * Offense * Date * What I want Bryan * Absence * 1/12/2011 * 1...
7
by: chip0105 | last post by:
I have five Business Units; BU1, BU2, BU3, BU4, and BU5 is ALL four BU's (scored values are totalled across all BU's). Each Business Unit has the same suppliers with individual monthly score data....
1
by: Beckiferanne | last post by:
Hi guys, Hopefully I will explain what I've been trying to do properly! I have a query that creates a ranking for stores energy usage in different areas. Someone has asked me to include the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.