Assignment Query Desk
identifies stable contenders across the archive.
Query brief
Clubs with repeated playoff qualification.
capture the result grid in phpMyAdmin after running the query.
SELECT
t.team_name,
c.country_name,
COUNT(*) AS playoff_seasons,
AVG(ts.playoff_seed) AS avg_seed,
MAX(ts.final_rank) AS best_finish_rank
FROM team_seasons ts
INNER JOIN teams t ON t.team_id = ts.team_id
INNER JOIN countries c ON c.country_id = t.country_id
WHERE ts.qualified_playoffs = 1
GROUP BY t.team_id, t.team_name, c.country_name
HAVING COUNT(*) >= 4
ORDER BY playoff_seasons DESC, avg_seed ASC;
Live result
| Team Name | Country Name | Playoff Seasons | Avg Seed | Best Finish Rank |
|---|---|---|---|---|
| Olympiacos Piraeus | Greece | 10 | 1.1000 | 2 |
| FC Barcelona | Spain | 10 | 2.9000 | 4 |
| Fenerbahce Beko Istanbul | Turkey | 10 | 3.1000 | 5 |
| Maccabi Playtika Tel Aviv | Israel | 10 | 3.7000 | 5 |
| EA7 Emporio Armani Milano | Italy | 9 | 4.6667 | 6 |
| AS Monaco | France | 9 | 5.3333 | 6 |