4
E.g:如何计算mysql中的不同列?
与select query
我得到以下结果:
columnA columnB
type1 typea
type2 typea
type3 typeb
type4 typec
type5 typed
type6 typed
type7 typed
与DISTINCT
我只得到了distinct result
,但我也希望得到每个不同的total number
。
,现在我想要得到的总数
的typea,typeb,typec and typed.
就像:
columnB total
typea 2
typeb 1
typec 1
typed 3
非常感谢您!
马丽娟!我得到了它的工作。非常感谢你! – qinHaiXiang 2011-03-03 00:32:24