SELECT COUNT(DISTINCT linka) AS pocet
  FROM zastavky
       JOIN
       linky
       ON id = zastavka_id
 GROUP BY zastavka
 ORDER BY pocet DESC
LIMIT 1;
-- NESTANDARNI KONSTRUKCE, LEPE POMOCI DERIVOVANE TABULKY
 
