为了账号安全,请及时绑定邮箱和手机立即绑定

请问这是什么错误啊!!!

请问这是什么错误啊!!!

犯罪嫌疑人X 2022-09-17 15:11:34

 select distinct pl.PLATFORM_ID,pl.PLATFORM_NAME,sc.SKILL_CATEGORY_ID,
sc.SKILL_CATEGORY_NAME,sub.sub_category_id,sub.sub_category_name,
cl.DELIVERY_MODE,cl.CLASS_NAME,cl.CLASS_ID,cl.GLOBAL_CODE,cl.COUNTRY_ID,co.COUNTRY,
cl.START_DATE,cl.END_DATE,cl.CLASS_STATUS,cl.CLASS_SIZE,cl.ENROLLMENT_DEADLINE,
count(ece.CLASS_ID) cnt,cl.release_date
from CLASSES cl
inner join CLASS_RELATED_SKILL cr on(cl.CLASS_ID = cr.CLASS_ID) 
left join skill sk on(sk.skill_id =cr.skill_id )
left join skill_related_subcategory srs  on(srs.skill_id = sk.skill_id)
  left join sub_category sub  on(srs.sub_category_id = sub.sub_category_id)
left join skill_category sc  on(sub.skill_category_id = sc.skill_category_id)
left join skill_machineType_model smm on(sk.skill_id = smm.skill_id)
left join platform pl on(sc.platform_id = pl.platform_id)
left join COUNTRY co on(cl.COUNTRY_ID = co.COUNTRY_ID)
left join EMP_CLASS_ENROLLMENT ece on(cl.CLASS_ID=ece.CLASS_ID)
  where smm.machine_type='9119'


10:45:39  [SELECT - 0 row(s), 0.000 secs]  [Error Code: -119, SQL State: 42803]  DB2 SQL Error: SQLCODE=-119, SQLSTATE=42803, SQLERRMC=ENROLLMENT_DEADLINE, DRIVER=4.8.87
... 1 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.000/0.000 sec [0 successful, 0 warnings, 1 errors]

查看完整描述

2 回答

?
牛魔王的故事

TA贡献1501条经验 获得超3个赞

建议优化下sql。
做那么多的表连接可能会影响性能,有些能用子查询的最好换成子查询。

查看完整回答
反对 回复 2022-09-21
?
蝴蝶不菲

TA贡献1472条经验 获得超4个赞

count是聚合函数,不能这样用的
建议将count换成子查询
(select count(*) from EMP_CLASS_ENROLLMENT where ....) as cnt

查看完整回答
反对 回复 2022-09-21

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信