문제 링크입니다: https://school.programmers.co.kr/learn/courses/30/lessons/131529
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
SUBSTRING 문법을 이용하여 쉽게 풀 수 있는 문제였습니다.
MySQL을 이용하여 풀었습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 코드를 입력하세요 | |
SELECT | |
SUBSTRING(PRODUCT_CODE, 1, 2) AS CATEGORY, | |
COUNT(*) AS PRODUCTS | |
FROM | |
PRODUCT | |
GROUP BY | |
CATEGORY | |
ORDER BY | |
CATEGORY | |

개발환경: Programmers IDE
지적, 조언, 질문 환영합니다! 질문 남겨주세요~
반응형
'알고리즘 > programmers' 카테고리의 다른 글
[Programmers] 조건별로 분류하여 주문상태 출력하기 (0) | 2023.06.19 |
---|---|
[Programmers] 상품을 구매한 회원 비율 구하기 (0) | 2023.06.18 |
[Programmers] 조회수가 가장 많은 중고거래 게시판의 첨부파일 조회하기 (0) | 2023.06.16 |
[Programmers] 조건에 부합하는 중고거래 상태 조회하기 (0) | 2023.06.15 |
[Programmers] 헤비 유저가 소유한 장소 (0) | 2023.06.14 |