Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

pivot example

Language: Editor: Layout:
View schema
Execution time: 0.02 sec, rows selected: 32, rows affected: 28, absolute service time: 0.16 sec 
fork mode |  history  | discussion
   VendorId IncomeDay IncomeAmount
1 SPIKE FRI 100
2 SPIKE MON 300
3 FREDS SUN 400
4 SPIKE WED 500
5 SPIKE TUE 200
6 JOHNS WED 900
7 SPIKE FRI 100
8 JOHNS MON 300
9 SPIKE SUN 400
10 JOHNS FRI 300
11 FREDS TUE 500
12 FREDS TUE 200
13 SPIKE MON 900
14 FREDS FRI 900
15 FREDS MON 500
16 JOHNS SUN 600
17 SPIKE FRI 300
18 SPIKE WED 500
19 SPIKE FRI 300
20 JOHNS THU 800
21 JOHNS SAT 800
22 SPIKE TUE 100
23 SPIKE THU 300
24 FREDS WED 500
25 SPIKE SAT 100
26 FREDS SAT 500
27 FREDS THU 800
28 JOHNS TUE 600
   VendorId MON TUE WED THU FRI SAT SUN
1 FREDS 500 350 500 800 900 500 400
2 JOHNS 300 600 900 800 300 800 600
3 SPIKE 600 150 500 300 200 100 400
   VendorId MON TUE WED THU FRI SAT SUN
1 SPIKE 900 200 500 300 300 100 400