Podatkovne baze 1

« nazaj

Podatkovne baze 1 - vaje 26.10.2020

SELECT [DISTINCT] grp_stolpec, SUM(stolpec), COUNT([* | [DISTINCT] stolpec]), ...
FROM tabela
WHERE stolpec [> | < | >= | <= | = | <>] [ALL | ANY] (
  SELECT ...
) AND stolpec IS [NOT] NULL
GROUP BY grp_stolpec
HAVING pogoj

Gnezdeni SELECT

Naloga DA DB AG HKK LM MO SO MP TP PR TS AT
6 x X x X X X X X X X X X X X
7 x X x X X X X X X X X X X X
8 x X x X X X X X X X X X X X
9 x X x X X X X X X X X X X X
10 x X x X X X X x X X X X X X

SUM in COUNT

Naloga DA DB AG HKK LM MO SO MP TP PR TS AT
1 x X x X X X X X X X X X X X
2 x X x X X X X X X X X X X X
3 x X x X X X X X X X X X X X
4 x X x X X X X X X X X X X X
5 x X x X X X X X X X X X X X
6 x X x X X X X X X X X X X X
7 x X x X X X X X X X X X X X
8 x X x X X X X X X X X X X X

Agregatne funkcije s tabelo nobel

Naloga DA DB AG HKK LM MO SO MP TP PR TS AT
1 x X x X X X X X X X X X X X
2 x X x X X X X X X X X X X X
3 x X x X X X X X X X X X X X
4 x X x X X X X X X X X X X X
5 x X x X X X X X X X X X X X
6 x X x X X X X X X X X X X X
7 x X x X   X X X X X X X X X
8 x X x X   X X X X X X X X X
10 x X x X X x X X X X X X X X
11 x X x X X x X X X X X X X X
12 x X x X X X X X X X X X X X