|
Программирование >> Хронологические базы данных
7.15.14.SELECT J.* FROM J WHERE J.CITY = London ; 7.15.15.SELECT DISTINCT SPJ.S# FROM SPJ WHERE SPJ.J# = Jl ; 7.15.16.SELECT SPJ.* FROM SPJ WHERE SPJ.QTY >= 300 AND SPJ.QTY <= 750 ; 7.15.17.SELECT DISTINCT P.COLOR, P.CITY FROM P ; 7.15.18.SELECT S.S#, P.P#, J.J# FROM S, P, J WHERE S.CITY = P. CITY AND P.CITY = J. CITY ; 7.15.19.SELECT S.S#, P.P#, J.J# FROM S, P, J WHERE NOT { S.CITY = P.CITY AND P.CITY = J.CITY ) ; 7.15.20.SELECT S.S#, P.P#, J.J# FROM S, P, J WHERE S.CITY <> P.CITY AND P.CITY <> J.CITY AND J.CITY <> P.CITY ; 7.15.21.SELECT DISTINCT SPJ.P# FROM SPJ WHERE { SELECT S.CITY FROM S WHERE S.S# = SPJ.S# ) = London ; 7.15.22.SELECT DISTINCT SPJ.P* FROM SPJ WHERE ( SELECT S.CITY FROM S WHERE S.S# = SPJ.S* ) = London AND ( SELECT J.CITY FROM J WHERE J.J# = SPJ.J# ) = London ; 7.15.23.SELECT DISTINCT S.CITY AS SCITY, J.CITY AS JCITY FROM S, J WHERE EXISTS ( SELECT * FROM SPJ
FROM SPJ AS SPJX, SPJ AS SPJY WHERE SPJX.SI = SPJY.SI AND SPJX.PI < SPJY.Pl ; 7.15.27.SELECT COUNT ( DISTINCT SPJ.JI ) AS N FROM SPJ WHERE SPJ.SI = SI ; 7.15.28.SELECT SUM ( SPJ.QTY ) AS X FROM SPJ WHERE SPJ.SI = SI AND SPJ.PI = РГ ; 7.15.29.SELECT SPJ.Pi, SPJ.JI, SUM ( SPJ.QTY ) AS Y FROM SPJ GROUP BY SPJ.PI, SPJ.JI ; 7.15.30.SELECT DISTINCT SPJ.Pl FROM SPJ GROUP BY SPJ.Pl, SPJ.JI HAVING AVG { SPJ.QTY ) > 350 ; 7.15.31.SELECT DISTINCT J.JNAME FROM J, SPJ WHERE J.JI = SPJ.JI AND SPJ.SI = SI ; 7.15.32.SELECT DISTINCT P.COLOR FROM P, SPJ WHERE P.PI = SPJ.Pl AND SPJ.SI = SI : 7.15.33.SELECT DISTINCT SPJ.P# FROM SPJ, J WHERE SPJ.J# = J.J# AND J.CITY = London ; 7.15.34.SELECT DISTINCT SPJX.J# FROM SPJ AS SPJX, SPJ AS SPJY WHERE SPJX.P# = SPJY.Pt AND SPJY.St = SI ; 7.15.35.SELECT DISTINCT SPJX.St FROM SPJ AS SPJX, SPJ AS SPJY, SPJ AS SPJZ WHERE SPJX.Pt = SPJY.Pt AND SPJY.St = SPJZ.St AND { SELECT P.COLOR FROM P WHERE P.Pt = SPJZ.Pt ) = Red ; 7.15.36.SELECT S.St FROM S WHERE S.STATUS < { SELECT S.STATUS FROM S WHERE S.St = SI ) ; 7.15.37.SELECT J.Jt FROM J WHERE J.CITY = ( SELECT MIN ( J.CITY ) FROM J ) ; 7.15.38.SELECT DISTINCT SPJX.Jt FROM SPJ AS SPJX WHERE SPJX.Pt = PI AND ( SELECT AVG ( SPJY.QTY ) FROM SPJ AS SPJY WHERE SPJY.Jt = SPJX.Jt AND SPJY.Pt = PI ) > ( SELECT MAX { SPJZ.QTY ) FROM SPJ AS SPJZ WHERE SPJZ.Jt = Jl ) ; 7.15.39.SELECT DISTINCT SPJX.St FROM SPJ AS SPJX WHERE SPJX.Pt = PI AND SPJX.QTY > { SELECT AVG ( SPJY.QTY ) FROM SPJ AS SPJY WHERE SPJY.Pt = PI AND SPJY.Jt = SPJX.Jt 7.15.40.SELECT J.Jt FROM J WHERE NOT EXISTS
|
© 2006 - 2024 pmbk.ru. Генерация страницы: 0
При копировании материалов приветствуются ссылки. |