ソースコード
SELECT
  C.CUST_CODE AS "CODE"
  , CUST_NAME AS "NAME"
  , COUNT(ORDER_NO) AS "CNT"
  , SUM(ORDER_AMNT) AS "TTL_AMT"
  , SUM(ORDER_AMNT) / COUNT(ORDER_NO) AS "AVG_AMT" 
FROM
  ORDERS AS O 
  INNER JOIN CUSTOMER AS C 
    ON O.CUST_CODE = C.CUST_CODE 
WHERE
  ORDER_DATE >= "2023-09-01" 
  AND ORDER_DATE <= "2023-09-30" 
GROUP BY
  C.CUST_CODE 
HAVING
  COUNT(ORDER_NO) >= 5 
ORDER BY
  COUNT(ORDER_NO) DESC
  , AVG_AMT DESC
  , CODE ASC;
提出情報
提出日時2023/12/18 09:55:24
コンテスト第10回 SQLコンテスト
問題優良顧客
受験者nagata
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量98 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
98 MB
データパターン2
WA
98 MB