标签: sql add
例如,如果我正在创建一个披萨商店数据库,它将看起来像这样
答案 0 :(得分:7)
SELECT pizza_type, COUNT(*) as 'NumberOrdered' FROM table GROUP BY pizza_type
答案 1 :(得分:6)
查看COUNT()函数和GROUP BY
select pizza_type, count(*) as NumberOrdered from orders group by pizza_type