SELECT stolpec1, stolpec2, stolpec3 - stolpec4 AS ime, ...., *
FROM tabela AS t
WHERE (pogoj OR (stolpec1 = stolpec2 + stolpec3))
AND stolpec4 LIKE '_=%' -- npr. 'a=123'
AND id IN (
SELECT stolpec FROM tabela
WHERE t.stolpec = id
)
ORDER BY stolpec1 ASC, stolpec2 DESC
LIMIT 10
SELECT
basicsNaloga | TA | ŽA | AB | PK | KK | AL | JL | HL | MM | AO | DR | BR | AS | MS | DŠ | LT | TT |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 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 | |||||
3 | x | x | x | x | x | x | x | x | x | x | x | x |
SELECT
from world
Naloga | TA | ŽA | AB | PK | KK | AL | JL | HL | MM | AO | DR | BR | AS | MS | DŠ | LT | TT |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 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 | |||||
3 | 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 | |||||
5 | 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 | |||||
7 | 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 | |||||
9 | 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 | |||||
11 | 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 | |||||
13 | x | x | x | X | x | x | x | x | x | x | x | x |
SELECT
from nobel
Naloga | TA | ŽA | AB | PK | KK | AL | JL | HL | MM | AO | DR | BR | AS | MS | DŠ | LT | TT |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 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 | |||||
3 | 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 | |||||
5 | 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 | |||||
7 | 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 | |||||
9 | 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 | |||||
11 | x | x | x | x | x | x | x | x | x | x | x | x | |||||
12 | x | x | x | x | x | x | x | x | x | x | x | ||||||
13 | x | x | x | x | x | x | x | x | x | x | |||||||
14 | x | x | x | x | x | x | x | x | x | x |
SELECT
within SELECT
Naloga | TA | ŽA | AB | PK | KK | AL | JL | HL | MM | AO | DR | BR | AS | MS | DŠ | LT | TT |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | x | x | x | x | x | x | x | x | |||||||||
2 | x | x | x | x | x | x | x | x | |||||||||
3 | x | x | x | x | x | x | x | x | |||||||||
4 | x | x | x | x | x | x | |||||||||||
5 | x | x | x | x | x | x | x | x | |||||||||
6 | x | x | x | x | x | x | |||||||||||
7 | x | x | x | x | |||||||||||||
8 | x | x | x | x | |||||||||||||
9 | x | x | x | x | |||||||||||||
10 | x | x | x | x |