mysql - How to use sql column value as field name of new table?
PHP中文网
PHP中文网 2017-05-18 10:56:14
0
1
590

Could you please let me know how to implement the result column value in the above picture as the field name of the new table? Please give me some advice, thank you all

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
我想大声告诉你
select date,sum(case when result='win' then 1 else 0 end) win,sum(case when result='lose' then 1 else 0 end) lose from tbl group by date;
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template