對不起,我想不出一種方式來描述它。如何在SQL中列出具有相似名稱的記錄總數?
我有一個SQL表,其中包含電線杆及其構造規格和數量。
我需要創建一個查詢,列出每個施工規格和數量。
例如:
Table- Poles
Type, Spec, Quanity
Record1- Pole, A5-1, 4
Record2- Pole, C4-1, 2
Record3- Pole, A5-4, 3
Record4- Pole, C4-1, 3
我需要一個查詢將返回:
Table- Spec Totals
Spec, Quantity
A5-1, 4
C4-1, 5
A5-4, 3
感謝您的幫助。
「相似」 或 「相同的」? – Matthew
同樣,對不起。 – ianbroad