ソースコード
SELECT
    HOUSEHOLD.CLASS_NAME AS CLASS,
    HOUSEHOLD.PERSON_NAME AS PERSON,
    HOUSEHOLD.AMT AS HOUSEHOLDS
FROM
    HOUSEHOLD
INNER JOIN
    (
        SELECT
            CLASS_CODE,
            MAX(AMT) AS MAX_AMT
        FROM
            HOUSEHOLD
        WHERE
            PERSON_CODE != '1' AND
            CLASS_CODE != '01'
        GROUP BY
            CLASS_CODE
    ) AS
    MAX_HOUSEHOLD ON
    MAX_HOUSEHOLD.CLASS_CODE = HOUSEHOLD.CLASS_CODE AND
    MAX_HOUSEHOLD.MAX_AMT = HOUSEHOLD.AMT
ORDER BY
    HOUSEHOLD.CLASS_CODE ASC
提出情報
提出日時2022/10/20 01:06:42
コンテスト第3回 SQLコンテスト
問題最大世帯人員
受験者naoigcat
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量111 MB
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
99 MB
データパターン2
AC
111 MB