출처: https://astrocosmos.tistory.com/202 [ASTROCOSMOS:티스토리] '코딩테스트' 태그의 글 목록 :: 하나둘셋넷
728x90

SQL SUM, MAX, MIN] 동물 수 구하기 COUNT

728x90
728x90

SQL String, Date] 조건별로 분류하여 주문상태 출력하기

728x90
728x90

SQL SELECT] 조건에 맞는 도서 리스트 출력하기

728x90
728x90

SQL JOIN] 오랜 기간 보호한 동물

728x90
728x90

SQL IS NULL] 이름이 있는 동물의 아이디

728x90
728x90

SQL GROUP BY] 저자 별 카테고리 별 매출액 집계하기

728x90
728x90

SQL SUM, MAX, MIN] 동물 수 구하기

-- 코드를 입력하세요
SELECT COUNT(ANIMAL_ID) as count
    FROM ANIMAL_INS I
728x90
728x90

SQL String, Date] 조회수가 가장 많은 중고거래 게시판의 첨부파일 조회하기 LIMIT 1

 

-- 코드를 입력하세요
SELECT CONCAT('/home/grep/src/',B.BOARD_ID,'/',F.FILE_ID,F.FILE_NAME,F.FILE_EXT) as FILE_PATH
    FROM USED_GOODS_BOARD B
    INNER JOIN(
        SELECT *
        FROM USED_GOODS_FILE
    ) as F on B.BOARD_ID = F.BOARD_ID
    WHERE B.BOARD_ID = (
        SELECT BOARD_ID
        FROM USED_GOODS_BOARD
        ORDER BY VIEWS DESC
        LIMIT 1
    )
    
    ORDER BY F.FILE_ID DESC
728x90
728x90

SQL IS NULL] 이름이 없는 동물의 아이디

-- 코드를 입력하세요
SELECT ANIMAL_ID
    FROM ANIMAL_INS
    WHERE NAME IS NULL
728x90

+ Recent posts