User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 422,678 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,569 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 807 | Replies: 7 | Solved
Join Date: Oct 2007
Location: South Africa
Posts: 60
Reputation: RoryGren is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 7
RoryGren's Avatar
RoryGren RoryGren is offline Offline
Junior Poster in Training

Queries and sub-queries

  #1  
Mar 27th, 2008
Hi all.

I have posted on this before with no response. Let me try a different way.

I have a db with a few tables :-

ATHLETE, which contains fields ATHLETE (the record Id), FIRST, LAST, AGE and SEX;
MEET, with fields MEET (the record Id), and MNAME;
RESULT, with fields ATHLETE, MEET, STROKE, DISTANCE, and SCORE.

The RESULT table obviously has multiple entries per athlete/swimmer - they can swim the 50 Freestyle at multiple meets.

I want to do the following:

On the page, a swimmer is selected from a list. The ATHLETE id selected and passed as a variable. The stroke and distance is then selected and also passed as a variable.

The script must then find that swimmer's age and sex from ATHLETE and then pull out only the top time for each athlete in that age group and sex, for that stroke and distance and then rank them.

I have a script already, but it takes a long time to return a result set.

In anticipation ... ;-)

Thanks
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 4:43 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC