sql 超级无敌纵列转横列
select GROUP_CONCAT(bb)
from (
select 1 as aa,concat(
substr(f_start_time, 1, 2), ':', substr(f_start_time, 3, 2),
'-',
substr(f_end_time, 1, 2), ':', substr(f_end_time, 3, 2), ':', f_elec_price) bb
from fp_pile_station.t_charge_policy
where f_equipment_id = '1101010000200302'
and f_yn = 1) t group by t.aa;
网友评论