Displaying Results Sub-Query Result in Another Query

A

Alan Balthrop

I have a table of soccer team attendance figures that I have written a "ranking sub-query" for. I would like to be able to display the
results of that ranking in a query of game results. Is it possible to use the ranking sub-query as one of the options in a different query?

Example:

Attendance 17,710 (1) (1 being the result of the Ranking querry for the atttendance figure 17,710)


Here is the SQL code of the sub-query:

SELECT (Select Count(*) from attendance_home where [attendance] > [g1].[attendance])+1 AS Ranking, g1.Attendance, g1.Date, g1.Team AS
Opponent
FROM attendance_home AS g1;




I hope my question makes sense. Thanks in advance for your advise!



Alan Balthrop
Team Historian/Broadcast Statistician
Dallas Sidekicks Indoor Soccer Club
http://www.kicksfan.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top