The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Select top three results from different catagories, I cannot seem to get this to work. I have a table full of hockey team
yennhi01011991
post Nov 13 2008, 12:53 AM
Post #1





Group: Banned
Posts: 4
Joined: 14-October 08
Member No.: 6,897



I post detail at [spam link removed by moderator]
I cannot seem to get this to work. I have a table full of hockey teams records that I need to get the top three teams based on points but each team of the top three has to be from a different division.

Here is an example:

Table: Teams

TEAM | POINTS | DIVISION
T#1 25 DIV#1
T#2 23 DIV#1
T#3 30 DIV#2
T#4 12 DIV#2
T#5 26 DIV#3
T#6 27 DIV#3

The result should look like this:
1. T#3
2. T#6
3. T#1

Not look like this:
1. T#3
2. T#6
3. T#5

Anybody have an idea what a select statement would look like for this?

Thanks is advance!

This post has been edited by Christian J: Nov 19 2008, 08:41 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd April 2024 - 10:31 AM