groub by를 이용한 count순 그룹 조회
작성자 관리자 작성시간 2009-09-03 14:22:54
 

select a.bbsno,  c.read_cnt, count(distinct(a.name)) cnt, c.subject, c.writer, c.wdate from tb_read_list a, tb_article c
where  a.bbsid=c.bbsid and a.bbsno=c.bbsno and a.bbsid='board008' and c.read_cnt > 50 and c.wdate > 20090631
group by a.bbsno, c.read_cnt, c.subject, c.writer, c.wdate
order by cnt desc;


목록 | 입력 | 수정 | 답변 | 삭제