《一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码》,点击传送门,即可获取!
| PRODUCT_CODE | NUMBER | N | 产品编码 |
| QUANTITY | NUMBER | N | 产品数量 |
| PRICE | NUMBER | N | 产品单价 |
================================================================
1.编写SQL语句,查询PIM_HEADERS表,符合日期在2011-03-01和2011-03-25之间的PI订单,显示订单号,创建日志,订单客户名称,订单业务员名称
select
t1.PI_NO
,t1.CREATION_DATE
,t2.CUSTOM_NAME
,t3.USER_NAME
from (select
from PIM_HEADERS
where CREATION_DATE between
to_date(‘2011-03-01’,‘yyyy-mm-dd’)
and
to_date(‘2011-03-25’,‘yyyy-mm-dd’)
) t1
left join CTM_CUSTOMERS t2
on t1.CUSTOMER_ID = t2.CUSTOMER_ID
left join SM_USER t3
on t1.OPERATOR_ID = t3.USER_ID
2.编写SQL语句,查询所有部门名称及其给部门的业务员的个数,部门在2011-01-01到2011-03-01之间创建的PI订单数
select t1._DEPARTMENT_NAME,count(t2.USER_NAME),count(t3.PI_NO)
from SM_DEPT t1
left join SM_USER_DEPT t2
on t1.dept_id = t2.dept_id
left join (select
from PIM_HEADERS
where CREATION_DATE between
to_date(‘2011-01-01’,‘yyyy-mm-dd’)
and
to_date(‘2011-03-01’,‘yyyy-mm-dd’)
) t3
on t2.user_id = t3.OPERATOR_ID
group by t1.DEPT_ID
3.编写SQL语句,查询所有客户及其相关PI订单号,PI创建日期,PI订单相关业务员姓名及其业务所属部门名称
select
t1.*
,t2.PI_NO
,t2.CREATION_DATE
,t3.USER_NAME
,t5.DEPARTMENT_NAME
from SM_CUSTOMERS t1
left join PIM_HEADERS t2
on t1.CUSTOER_ID = t2.CUSTOMER_ID
left join SM_USER t3
on t2.OPERATOR_ID = t3.user_id
left join SM_USER_DEPT t4
on t3.USER_ID = t4.USER_ID
left join SM_DEPT t5
on t4.DEPT_ID = t5.DEPT_ID
4.编写SQL语句,更新没有下过PI订单的客户名称的备注为“从未发生业务往来”
update CTM_CUSTOMERS t1 set COMMENTS = ‘从未反生业务往来’
where not exists (
select PI_NO from PIM_HEADERS t2
where t2.CUSTOMER_ID = t1.CUSTOMER_ID
) ;
commit;
5.编写SQL语句,查询所有客户名称及其所属城市,并按照城市名称降序,用户名称升序排序
select CUSTOM_NAME,CITY
from CTM_CUSTOMERS
order by city desc,CUSTOMER_NAME asc
6.编写SQL语句,查询出所有的客户的PI订单的下单金额,显示客户名称,订单币种,订单总数量及订单总额
select
t2.CUSTOMER_NAME
,t1.CURRENCY_CODE
,t3.TOTAL
,t4.TOTAL_MONEY
from PIM_HEADERS t1
left join CTM_CUSTOMERS t2
on t1.CUSTOMER_ID = t2.CUSTOMER_ID
left join (
select PI_ID,sum(QUANTITY) TOTAL,sum(QUANTITY*PRICE) TOTAL_MONEY
from PIM_LINES
group by PI_ID
) t3
on t1.PI_ID = t3.PI_ID;
7.编写函数,函数需传入部门ID,返回结果部门对应所有业务员姓名连接起来,中间用逗号隔开
create or replace function getUserByDeptId
( dept_id number) return varchar2
is
res varchar2(200);
cursor mycursor(did number) is
select t2.CUSTOMER_NAME
from (select *
from SM_USER_DEPT
where dept_id = did
) t1
left join SM_USER t2
on t1.USER_ID = t2.USER_ID ;
begin
for c_row in mycursor(dept_id) loop
res := res ||‘,’|| c_row
end loop;
return res;
end;
Kafka进阶篇知识点
Kafka高级篇知识点
44个Kafka知识点(基础+进阶+高级)解析如下
由于篇幅有限,小编已将上面介绍的**《Kafka源码解析与实战》、Kafka面试专题解析、复习学习必备44个Kafka知识点(基础+进阶+高级)都整理成册,全部都是PDF文档**
《一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码》,点击传送门,即可获取!
1714644916792)]
44个Kafka知识点(基础+进阶+高级)解析如下
[外链图片转存中…(img-9EetwYh1-1714644916793)]
由于篇幅有限,小编已将上面介绍的**《Kafka源码解析与实战》、Kafka面试专题解析、复习学习必备44个Kafka知识点(基础+进阶+高级)都整理成册,全部都是PDF文档**
《一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码》,点击传送门,即可获取!