SELECT ., .
FROM INNER JOIN ON(.=.)
WHERE count(*)=0
UNION
SELECT ., .
FROM INNER JOIN ON (.=.)
WHERE count(*)=1 AND city=paris
GROUP BY .
ORDER BY .
(, , , ) ;
(, , , , ) ;
(, , ) .
200: , , . .
SELECT ., ., count(*), SUM(.qty)
FROM INNER JOIN ON (.=.)
WHERE AVG(.qty)>200
GROUP BY .
ORDER BY .
(, , , ) ;
(, , , , ) ;
(, , ) .
: , , , , . , .
SELECT .status, .city, count(*), SUM(.qty), count(.)
FROM INNER JOIN ON (.=.)
GROUP BY .status, .city
ORDER BY .status, .city
(, , , ) ;
(, , , , ) ;
(, , ) .
, , , 123123: , , .
SELECT ., ., sum(.qty)
FROM , ,
WHERE(.=.) AND (.=.) AND(.city=Paris)
GROUP BY ., .
HAVING SUM(.qty)>(SELECT SUM(.qty)
FROM
WHERE .=123123)
(, , , ) ;
(, , , , ) ;
(, , ) .
, 100 , . .
SELECT ., .
|
|
FROM INNER JOIN ON (.=.)
WHERE
EXIST(SELECT DISTINCT .
FROM INNER JOIN ON (.=.)
WHERE (.= Ivanov) AND (.qty>100)
ORDER BY .
(, , , ) ;
(, , , , ) ;
(, , ) .
, 100 , , , . .
SELECT ., .
FROM INNER JOIN ON (.=.)
WHERE NOT EXIST(SELECT .
FROM INNER JOIN ON ()
WHERE (.=SHaiba) AND
NOT IN (SELECT . FROM ,
WHERE ((.=.) AND .qty>100)
ORDER BY . DECT
(, , , ) ;
(, , , , ) ;
(, , ) .
, 100 , ʭ (, ). .
SELECT ., .
FROM INNER JOIN ON(.=.)
WHERE NOT EXIST((SELECT .
FROM INNER JOIN ON ()
WHERE .=Ivanov) AND .qty>100)
ORDER BY . DECT