
Pivot the Occupation column in OCCUPATIONS so that each Name is sorted alphabetically and displayed underneath its corresponding Occupation. The output column headers should be Doctor, Professor, Singer, and Actor, respectively. Note: Print NULL when there are no more names corresponding to an occupation. Input Format The OCCUPATIONS table is described as follows: Occupation will only contain on..

PIVOT 구문은 ROW로 출력된 결과를 COLUMN으로 변환시키는 역할을 한다. 예를 들어, 아래 쿼리는 연도별, 주문ID별, 주문수량의 합계를 출력한다. 결과를 보면 주문ID별로 2011, 2012, 2013, 2014 이렇게 4개의 ROW로 출력되어 한 눈에 확인이 어려운 느낌이다. SELECT CONVERT(VARCHAR(4), DueDate, 112) [DueYEAR] , LEFT(PurchaseOrderID,1) [PurchaseOrderID] , SUM(OrderQty) [OrderQty] FROM [AdventureWorks2014].[Purchasing].[PurchaseOrderDetail] GROUP BY CONVERT(VARCHAR(4), DueDate, 112) , LEFT(Pur..
- Total
- Today
- Yesterday
- 미중무역전쟁
- 에코캡
- 매매일지
- list
- TSQL
- Weather Observation Station
- HK이노엔
- 해커랭크
- python3
- hackerrank
- insert
- MS SQL Server
- DATABASE
- 리비안
- 대원화성
- Tableau
- 테슬라
- string
- 넥스트BT
- 코로나19
- 분석탭
- python
- 경구치료제
- SQL Server
- MSSQL
- 몰누피라비르
- tensorflow
- mysql
- 넷플릭스
- 동국알앤에스
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |