22问答网
所有问题
当前搜索:
sql查询找出工资一千的人
Oracle
查询工资
最高和最低的工种,用
sql语句
表达出来,谢谢。
答:
--建立例表 create table test_gz(gongzhong varchar2(10),gongzi number(10,2));--插入测试数据 insert into test_gz values('钳工',1100);insert into test_gz values('焊工',1200);insert into test_gz values('保管员',1300);insert into test_gz values('主任',1400);--
查询工资
最高...
sql查询
员工的基本
工资
排名第3-6位的姓名和基本工资
答:
select 姓名,
工资
from (select 姓名,工资 from 工资表 order by 工资) where rownum between 3 and 6以上是Oracle写法
SQL
中的LIMIT语句
查询工资
排前3和第6的员工信息。
答:
select * from table order by
工资
desc limit 3 select * from table order by 工资 desc limit 5,1
哪位高手能回答下这几条数据库的
查询
命令~
答:
select 部门经理编号 from 部门 where 部门编号 in (select 部门编号 from 员工 group by 部门编号 having avg(
工资
)>4000))5.select from 员工 where 编号 in (select distinct 部门经理编号 from 部门,工程 where 部门.部门经理编号=工程.工程负责人编号 )6.select from 员工 where 性别='男'...
写一条
sql 查找 工资
第二高
的人
答:
这句就可以了select top 1 id from email where id<>(select top 1 id from email order by id desc) order by id desc
SQL语句查询
解决实际问题?
答:
问题1:我觉得问题1问的有问题 如果你是想求表1中有而表2中没有的5号孔八,是下面这条:select * from 表1 where num=(select num from 表1 minus select num from 表2);如果你是想求表2中有而表1中没有的4号,是下面这条:select * from 表2 where num=(select num from表2 minus ...
请教关于
SQL语句查询
记录的问题!
答:
--
sql
server数据库/*思路是这样的,按人员编码partition ,时间ASC序 给所有的数字编码1,2,3,4,。。。as idx,然后自己跟自己inner join ,连接的条件是 A.人员编号=B.人员编号,同时 A.IDX =B.IDX-1 */--step 1 按人员编码partition ,时间ASC序 给所有的数字编码 存入临时表#tempselect ...
SQL查询
比例的问题
答:
select ((select count(*) from 表名 where
工资
between
1000
and 1500 )*100/(select count(*) from 表名))显示的直接就是百分比.
SQL
(
查询
)一些简单的问题
答:
1.select first_name,salary from employees where salary>=7500;2.select first_name,dept_id from employees where em_id=116;3.select first_name,salary from employees where salary between 5000 and 12000;4.select first_name,dept_id from employees where dept_id in(30,90);5.select ...
查询
每个部门总工资,和每个部门的平均
工资的sql语句
?
答:
以oracle中默认scott用户下的dept表和emp表为例:两个表数据分别如下:dept表:emp表:求每个部门总
工资sql语句
如下:select b.dname,sum(nvl(a.sal,0)) sal from emp a,dept b where a.deptno(+)=b.deptno group by b.dname;结果如图:求每个部门平均
工资的sql语句
如下:select b.dname,round...
棣栭〉
<涓婁竴椤
3
4
5
6
8
7
9
10
11
12
涓嬩竴椤
灏鹃〉
其他人还搜