栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > SEO面试题

一道oracle面试题

SEO面试题 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

一道oracle面试题

客户表a(id name address) 登陆流水表b(id time) 购物流水表c(id time productid productnum)
1.求每个客户的最新登陆时间time姓名name客户id?
2.查最新登陆并且已经购买商品的客户idname登陆的时间time(一条sql语句)

一个表student中有班级classid学号id成绩grade
1.计算各个班的平均成绩
2.查找比该班平均成绩高的学生的班级classid学号id成绩grade
€€
1.求每个客户的最新登陆时间time姓名name客户id
select a.ida.named.time as time
from a left join (select idmax(time) as time from b group by id) d
on a.id =d.id ;
2.查最新登陆并且已经购买商品的客户idname登陆的时间time(一条sql语句)
select a.ida.named.time as time
from a(select idmax(time) as time from b group by id) d
where a.id =d.id
and exists (select * from c where id = a.id);
1.计算各个班的平均成绩
select classidavg(grade)
from student
group by classid;
2.查找比该班平均成绩高的学生的班级classid学号id成绩grade
select a.classida.ida.grade
from student a
where a.grade >(select avg(grade) from student where classid = a.classid);

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/299544.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号