首页 > 技术文章 > sql语句case when 以及left()

chenlw 2019-02-19 16:32 原文

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

推荐阅读