SQL简单查询问题!
我有一个表
tableA
userid uyear umonth uday
四个字段都是int,用户来记录用户登录用的!
select userid,count(userid) as count2 from temped where umonth=2 group by userid order by userid
这条语句,可以输入2月份,各用户登录的次数!
现在,想2,3,4,5,6 月份一起输入 该如何写?
得到的结果希望是
userid count2(二月) count3(三月) count4(四月) count5(五月) count6(六月)