ソースコード
-- SELECT CLASS_NAME as CLASS, PERSON_NAME as PERSON, MAX(AMT) as HOUSEHOLDS
-- FROM HOUSEHOLD
-- GROUP BY CLASS_NAME, PERSON_NAME
-- HAVING PERSON_CODE <> 1 and CLASS_CODE <> "01"
-- ORDER BY CLASS_CODE

SELECT CLASS_NAME as CLASS, PERSON_NAME as PERSON, AMT as HOUSEHOLDS
FROM HOUSEHOLD as H
WHERE AMT in (SELECT MAX(AMT) as HOUSEHOLDS FROM HOUSEHOLD  WHERE PERSON_CODE <> 1 and CLASS_CODE <> "01"  GROUP BY CLASS_NAME)
GROUP BY CLASS_NAME, PERSON_NAME
HAVING PERSON_CODE <> 1 and CLASS_CODE <> "01"
ORDER BY CLASS_CODE
提出情報
提出日時2022/10/19 19:36:38
コンテスト第3回 SQLコンテスト
問題最大世帯人員
受験者seiya592
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量92 MB
メッセージ
テストケース(通過数/総数)
1/2
状態
メモリ使用量
データパターン1
WA
90 MB
データパターン2
AC
92 MB