inblog logo
|
jay0628
    programmers MySQL

    [MySQL] 19. 가장 큰 물고기 10마리 구하기

    김주희's avatar
    김주희
    Mar 19, 2025
    [MySQL] 19. 가장 큰 물고기 10마리 구하기
    Contents
    1. 문제 설명, 제한 사항, 입출력 예시2. 아이디어3. 풀이 코드

    1. 문제 설명, 제한 사항, 입출력 예시

    ❗
    school.programmers.co.kr
    https://school.programmers.co.kr/learn/courses/30/lessons/298517
    notion image
    notion image
    notion image
     

    2. 아이디어

    1. 가장 큰 물고기 10마리
      1. 길이를 기준으로 내림차순 정렬 후
      2. 10개만 select
        1. limit n
     

    3. 풀이 코드

    select id, length from FISH_INFO order by length desc, id asc limit 10;
     
    다른 사람 풀이
     
    Share article

    jay0628

    RSS·Powered by Inblog