Search

'카운트'에 해당되는 글 2건

  1. 2018.06.04 [ORACLE]COUNT DECODE
  2. 2010.12.10 [ORACLE] 중복카운트수 찾기, 대소문자 구별

[ORACLE]COUNT DECODE

Database 2018.06.04 09:23 Posted by 애플자라

SELECT '신청: '||TOTAL||'건(전체), '||P_TYPE||'건(PC), '||M_TYPE||'건(모바일)' AS EVENT_M

FROM

(

SELECT COUNT (1) AS TOTAL,

       COUNT (DECODE (TYPE, 'P', 'P')) AS P_TYPE,

       COUNT (DECODE (TYPE, 'M', 'M')) AS M_TYPE

  FROM N_BOARD_EVENT

)

[ORACLE] 중복카운트수 찾기, 대소문자 구별

Database 2010.12.10 19:07 Posted by 애플자라

SELECT UPPER(MEMBER_ID),COUNT(UPPER(MEMBER_ID)) FROM MEMBER_INFO
GROUP BY UPPER(MEMBER_ID)
HAVING COUNT(UPPER(MEMBER_ID)) > 1