【发布时间】:2011-07-07 09:49:18
【问题描述】:
例如:
使用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
非常感谢!!
【问题讨论】: