select 类别, sum(数量) as 数量之和 from A group by 类别
select 类别, sum(数量) AS 数量之和 from A group by 类别 order by sum(数量) desc
select 类别, sum(数量) as 数量之和, 摘要 from A group by 类别 order by 类别 desc
select 类别, 摘要, sum(数量) as 数量之和 from A group by all 类别, 摘要
select 类别, 摘要, sum(数量) AS 数量之和 from A group by 类别, 摘要
| 函数 | 作用 | 支持性 |
|---|---|---|
| sum(列名) | 求和 | |
| max(列名) | 最大值 | |
| min(列名) | 最小值 | |
| avg(列名) | 平均值 | |
| first(列名) | 第一条记录 | 仅Access支持 |
| last(列名) | 最后一条记录 | 仅Access支持 |
| count(列名) | 统计记录数 | 注意和count(*)的区别 |
select 类别, avg(数量) AS 平均值 from A group by 类别;
select 类别, count(*) AS 记录数 from A group by 类别;
select 类别, sum(数量) as 数量之和 from A group by 类别 having sum(数量) > 18
select 类别, SUM(数量)from A where 数量 gt;8 group by 类别 having SUM(数量) gt; 10
select * from A where 数量 > 8
select * from A where 数量>8 compute max(数量),min(数量),avg(数量)
select * from A where 数量>8 order by 类别 compute max(数量),min(数量),avg(数量) by 类别
《黎明杀机》开发商正开发新的《Serious Sam》游戏 由Devolver发行
超英派遣中心即将登陆Xbox Play Anywhere 深入了解这款独特而备受喜爱的冒险游戏
在《Hunter: The Reckoning – Deathwish》中怎么从猎物蜕变为猎手
《The Expanse: Osiris Reborn》——深入了解玩法 新同伴 封闭测试及发行窗口
Alien Deathstorm 科幻生存与动作结合 打造全新第一人称恐怖混合体验
宝可梦公司已在考虑未来可用口袋妖怪总数达到“或许一万只”
幸存者村庄2
怪可爱的店折相思菜单
怪可爱的店折相思菜单是一款画风治愈的模拟经营佳作,内置折相思菜单解锁多项便利功能
lol电竞经理人手游
lol电竞经理人手游让你可以成为职业的电竞经理人,在游戏中掌控游戏的走向!豪华阵
梦幻奶茶屋小游戏
梦幻奶茶屋是一款主打温馨治愈氛围的休闲经营作品,玩家将化身元气满满的奶茶店店长,
萌宠养成物语无限金币版
萌宠养成物语无限金币版是一款治愈系模拟养成游戏,以可爱卡通画风构建温馨虚拟世界,