Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query a MySQL Query - possible?

Status
Not open for further replies.

NigeB

Technical User
Nov 29, 2000
53
GB
I have a table of data that contains the following fields:

team, date, time

Some teams run twice a month some only every few months, I need to calculate
a seedings time based on the following:

The fastest time a team ran in it's last 3 outings, however all times
recorded more than 120 days ago is to be ignored.

In Access I created a query to count each team entry and assign a number
1,2,3,4 etc. I then wrote a separate query to query that one and discount
any number over 3 and any date over 120 days.

The 3rd query simply queried the 2nd and returned the fastest time for each
team.

Can anyone think of a way of achieving this in MySQL?

Any help is appreciated

Nige.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top