这是我的sql
select t1.id from demo t1
where substring(t1.id, -3) = case
when (select count(*) from demo t2 where t2.id like concat(substring(t1.id, 1, length(t1.id) - 3), '%')) = 2
then 'ENG'
else 'KOR'
end;
我试图将我的 sql 转换为 CaseBuilder 但没有成功,因为它无法在 when 语句中添加 select 任何帮助,将不胜感激。谢谢