我有一个类别列表,我能够使用选择不同的语句,但努力“计数”一个类别被使用了多少次,我有一个名为Description的列,我需要创建另一个名为occurrence的列。如何编写SELECT DISTINCT查询?
Description
-------------
Arts, crafts, and collectibles
Baby
Beauty and fragrances
Books and magazines
Business to business
Clothing, accessories, and shoes
Computers, accessories, and services
Education
Electronics and telecom
Entertainment and media
Financial services and products
Food retail and service
Gifts and flowers
Government
Health and personal care
Home and garden
Nonprofit
Pets and animals
Religion and spirituality (for profit)
Retail (not elsewhere classified)
Services - other
Sports and outdoors
Toys and hobbies
Travel
Vehicle sales
Vehicle service and accessories
Books and magazines
Business to business
Clothing, accessories, and shoes
Computers, accessories, and services
Education
Electronics and telecom
Entertainment and media
Financial services and products
Food retail and service
Gifts and flowers
Government
Health and personal care
Services - other
Sports and outdoors
Toys and hobbies
Travel
Vehicle sales
Vehicle service and accessories
Books and magazines
Business to business
Clothing, accessories, and shoes
Business to business
Clothing, accessories, and shoes
Computers, accessories, and services
Education
Electronics and telecom
Entertainment and media
Financial services and products
Food retail and service
阅读本请https://stackoverflow.com/help/how-to-ask –
可以使用计数的'组合(1)'和'组by' – Hackerman
向我们展示您的查询,准确地解释为什么输出不是你想要的,为什么你认为你的查询会产生它。 – csmckelvey