-2
Q
내가 어떻게해야
A
답변
0
당신은 그렇게 하위 쿼리를 사용할 수 있습니다
이select name, gol, count(attendance) as count_data,(Select count(attendance) from tablename n where n.attendance='yes' and n.name=tablename.name and n.gol=tablename.gol) as count_attendance from tablename group by name,gol
그냥 테이블의 이름으로 TABLENAME을 교체합니다.
무엇을 시도 했습니까? 어떤 오류가 있었습니까? 너도 해봤 니? 질문이나 오류 메시지로 질문을 업데이트해야합니다. –
나는 당신이 얻고 자하는 것이 무엇인지 모르겠다.'count_attendance'는'AAA'의 줄 수를 기준으로 계산됩니까 ?? – Lee
나는 이미 "이름, 이름, 골, 카운트 (출석)를 예제 그룹에서 선택"하려고합니다. 출석 '예'라면 count_attendance를 선택하는 것이 혼란스럽고 출석을 '아니오'로 계산하십시오. –