ソースコード
SELECT 
    CASE WHEN AG.AGE_CODE >= 2 AND AG.AGE_CODE <= 6 THEN AG.AGE_NAME
        ELSE NULL END AS '年齢階層',
    CASE WHEN TIME_CODE = 120 AND STD.AGE_CODE = 2 THEN TIME_CODE END) AS '5時間以上6時間未満',
    CASE WHEN TIME_CODE = 130 AND STD.AGE_CODE = 3 THEN COUNT(TIME_CODE) END AS '5時間以上6時間未満',
    CASE WHEN TIME_CODE = 140 AND STD.AGE_CODE = 4 THEN COUNT(TIME_CODE) END AS '6時間以上7時間未満',
    CASE WHEN TIME_CODE = 150 AND STD.AGE_CODE = 5 THEN COUNT(TIME_CODE) END AS '7時間以上8時間未満',
    CASE WHEN TIME_CODE = 160 AND STD.AGE_CODE = 6 THEN COUNT(TIME_CODE) END AS '8時間以上9時間未満',
    CASE WHEN TIME_CODE = 170 AND STD.AGE_CODE = 7 THEN COUNT(TIME_CODE) END AS '9間以上',
    CASE WHEN TIME_CODE = 180 AND STD.AGE_CODE = 8 THEN COUNT(TIME_CODE) END AS '不詳'
FROM SLEEP_TIME_DTL AS STD
INNER JOIN AGE_GRP AS AG ON AG.AGE_CODE = STD.AGE_CODE
GROUP BY STD.AGE_CODE
;
提出情報
提出日時2024/10/14 15:38:40
コンテスト練習用コンテスト
問題年齢別睡眠時間分析
受験者xjo
状態 (詳細)RE
(Runtime Error: 実行時エラー)
メモリ使用量87 MB
メッセージ
SQLITE_ERROR: near ")": syntax error
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
RE
87 MB
データパターン2
RE
84 MB