sql语句case when 以及left()

select count(CASE jyje WHEN '1300' THEN '2' ELSE '1' END) as count  from tpent_orders where cplx = 6 and left(time,4)  ='2019' 

原文地址:https://www.cnblogs.com/chenlw/p/10401873.html