Professional Documents
Culture Documents
سیف الله رستمی
سیف الله رستمی
:)الف
select count(distinct o.driver_id) from owns o ,
Participated p , Accident a where
o.car_id=p.car_id and
p.report_number=a.report_number
and date=1391 ;
:)ب
select count(distinct p.report_number) from owns o ,
Participated p , Person a where
o.car_id=p.car_id and a.driver_id=o.driver_id and
a.name=N''احمدی
and date=1391 ;
:)د
:) الف
select sname from s where s# in (select s# from sp ,p
where sp.p#=p.p# and p.color=N')'قرمز
and s# not in (select s# from sp ,p where sp.p#=p.p# and
p.color<>N')'قرمز
:)ب
:)ج
:)الف
select STID , STNAME from STT st where not exists
((select count(*) from STCOT where STID=st.STID)
except (select count(*) from STCOT where STID=st.STID
and grade>=10))
:)ب
select sum(credit) from COT ,STCOT where
COT.COID=STCOT.COID and STCOT>STID='97121100'
:)ج
:)د
select * from COT where COTYPE=N' 'عملیand coid in (select coid
from STCOT ,STT where STCOT.STID=STT.STID and STT.STNAME='ali
ahmadi'
and TR=1 and YEAR='98-99')