SELECT
sum(case t.station_id
when '00594' then
1
end) A,
sum(case
when t.station_id > '00594' then
1
end) B,
sum(case
when t.station_id < '00594' then
'1'
end) C
FROM db_station t
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8858135/viewspace-905467/ ,如需转载,请注明出处,否则将追究法律责任。