SQL数据库几个题目,100分悬赏!高手请进!

2024-11-27 16:24:54
推荐回答(2个)
回答1:

1、 select eno, ename,age from emp where job_title=‘高级’ and gender=1

2、
∏eno, ename,age (φjob_title=‘高级’ and gender=1 (emp))
注:其中的∏表示投影,φ表示选择.

4、create index 索引名 on emp (eno)

5、select dept.dname ,count(emp .eno) from dept ,emp
where emp.dno=dept.dno
group by dename

6、select dept.dno ,dept.dname, avg(salary) from dept ,emp
where emp.dno=dept.dno and salary>3000
group by dename ,dno

回答2:

1.select ENO,ENAME,AGE from EMP where JOB_TITLE='高级' and GENDER='1'
6.select DNO,DNAME, gongzi from EMP,(select DNO,AVG(SALARY)as gongzi from EMP group by DNO having AVG(SALARY)>3000 )as new where EMP.DNO=new.DNO