One of my friends asked me this question, it is a small sql puzzle, we have a table in the below organization;
create table tr_football_league
( club_id number,
championship_year number(4), — only the year
year_100th_champion number(1) — 0 false, 1 true
— the data to be inserted is here
insert into tr_football_league (1, ‘FENERBAHCE’, 2007, 1) ;
so the wanted sql must return which club was champion on its 100th year and also owns the most championship count in the data mentioned above. the answer is so easy, it is my precious club FENERBAHCE, but what do you think about the sql?