Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
PIVOT を使用して毎月の従業員の給与を取得するクエリを以下に示しますが、適切に終了しない SQL コマンドがスローされます。確認して修正してください
SELECT * FROM ( SELECT EMPID, MONTH, SALARY FROM SALARY ) PIVOT(SALARY AS SALARY FOR (MONTH) IN ('Jan','Feb','Mar')) ORDER BY EMPID;
試す
SELECT EMPID, MONTH, SALARY FROM SALARY PIVOT(SALARY AS SALARY FOR MONTH IN ('Jan','Feb','Mar')) ORDER BY EMPID;
参照