가 나는 경우 로직의 선택 하위 쿼리 문에서 수행 할 선택IN와 CASE 및 하위 쿼리
그래서 쿼리의 아이디어는 다음과 같이이다 :
select a.client_id,
(case when a.client_id in (select distinct a.client_id from account a
where a.display_name='b') then '1' else '0' end) as binary
from account a
group by a.client_id
order by a.client_id
그것은 오류를 보여 주므로 어떻게 대체하고 다시 작성할 수 있는지 궁금합니다.
감사합니다.
무엇이 오류입니까? – dasblinkenlight
그룹화 할 대열을 – Horaciux
@jpw로 추가 - 아니요 동일하지 않음 –