게시글
group by 내에서 그룹으로 묶은 것에 대한 정렬하는 방법
select * from tablename as p where 1 and sidx_code in ( select max(sidx_code) from tablename where 1 and sidx_code=p.sidx_code ) group by p_title 위에 있는 필드 값을 접근하기 위해서는 위에 as p로 하고 p.sidx_code로 접근하면 된다.
#프로그램 #소스 #Mysql #쿼리 #서브쿼리 #groupby #그룹정렬 #테이블별칭