ソースコード
SELECT DH2.PF_CODE AS CODE
	,PR.PF_NAME AS NAME
	,SUB1.DH1_AMT
	,DH2.CATEGORY_CODE
  FROM (SELECT DH1.PF_CODE AS DH1_CODE , DH1.AMT AS DH1_AMT FROM DRINK_HABITS AS DH1 WHERE DH1.CATEGORY_CODE = '120' GROUP BY DH1.PF_CODE)
    AS SUB1
    INNER JOIN  
  DRINK_HABITS AS DH2
    ON SUB1.DH1_CODE = DH2.PF_CODE
	 INNER JOIN PREFECTURE AS PR
		    ON DH2.PF_CODE = PR.PF_CODE
    WHERE DH2.CATEGORY_CODE != '130'


--SELECT DH2.PF_CODE AS CODE , PR.PF_NAME AS NAME FROM DRINK_HABITS AS DH2 INNER JOIN PREFECTURE AS PR ON DH2.PF_CODE = PR.PF_CODE

--SELECT DH1.PF_CODE AS DH1_CODE , DH1.AMT DH1_AMT FROM DRINK_HABITS AS DH1 WHERE DH1.CATEGORY_CODE = '120' GROUP BY DH1.PF_CODE
提出情報
提出日時2022/09/21 17:18:31
コンテスト第2回 SQLコンテスト
問題飲酒率
受験者005321
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量93 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
86 MB
データパターン2
WA
93 MB