NejvicVypujcek

From Wikivyuka
Revision as of 11:44, 5 December 2011 by Dur30 (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
SELECT Count(id_ex) AS pocetVypujcek, c_cten
FROM VYPUJCKA AS v
GROUP BY c_cten;

Tento dotaz ulozime pod nazvem pocetVyp a pouzijeme jej jako vstup do dalsiho dotazu:

SELECT TOP 1 pocetVyp.pocetVypujcek AS NejvicVypujcek, CTENAR.prijmeniC
FROM pocetVyp INNER JOIN CTENAR ON pocetVyp.c_cten = CTENAR.c_cten
ORDER BY pocetVyp.pocetVypujcek desc;

Zpět na stránku DBS - cvičení