Welcome aboard! We are happy you are here and wish you good net-raft!
MY_TEST_TABLE:
NAME MONTH INV
name1 201609 30
name2 201610 50
name3 201611 60
------------------------------------------------------------------
select * from MY_TEST_TABLE
pivot (
max(INV)
for MONTH in ( '201609' "201609",
'201610' "201610",
'201611' "201611"
)
)
order by NAME
The most helpful SQL solutions
how to execute select into using sql ?SQL
Click to see more ...
726
53
convert string to date sqlSQL
Click to see more ...
641
42
How to get the last record from table using sql ?SQL
Click to see more ...
557
33
create table sqlSQL
Click to see more ...
332
23
How use like using sql ?SQL
Click to see more ...
411
22
How to get the last 10 records using mysql ?SQL
Click to see more ...
308
21
rows to columns sqlSQL
Click to see more ...
264
17
insert new column into table sqlSQL
Click to see more ...
264
16
How to convert the values to lowercase using sql ?SQL
Click to see more ...
284
13
How to change a negative number to positive using sql ?SQL
Click to see more ...
219
11