我有一個類別列表,我能夠使用選擇不同的語句,但努力「計數」一個類別被使用了多少次,我有一個名爲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