ソースコード
SELECT [S].[SALES_DATE] AS [SAL_DATE]
,[SD].[SALES_NO] AS [NO]
,[SD].[ITEM_CODE] AS [ITEM_CODE]
,[SD].[SALES_QTY] AS [SAL_QTY]
,[SD].[DELIVERED_QTY] AS [DEL_QTY]
,CASE WHEN [SD].[DELIVERED_QTY] = 0 THEN '未出荷'
      WHEN [SD].[DELIVERED_QTY] <> 0
            AND [SD].[SALES_QTY] > [SD].[DELIVERED_QTY]
            THEN '一部出荷'
      WHEN [SD].[SALES_QTY] = [SD].[DELIVERED_QTY] THEN '出荷済'
      END AS [SHIP_STS]
FROM [SALES] AS [S]
LEFT OUTER JOIN [SALES_DTL] AS [SD]
ON [S].[SALES_NO] = [SD].[SALES_NO]
WHERE [S].[SALES_DATE] BETWEEN '2024-04-01' AND '2024-04-10'
ORDER BY [S].[SALES_DATE] DESC
,[SD].[SALES_NO] ASC
,[SD].[ITEM_CODE] ASC
提出情報
提出日時2024/06/10 11:51:26
コンテスト第1回 SQLコンテスト初級編
問題出荷状況確認
受験者kkkkyyyy
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量90 MB
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
88 MB
データパターン2
AC
90 MB