這是我的第一個查詢工作正常。另一個查詢的查詢結果
SELECT count(event_log_id) as icount, cast(youth_name as varchar(max)) as yname
FROM CIRComplete
WHERE actual_date between '2012-01-01' and '2012-04-30'
AND is_deleted = '0' AND Closed = '1'
GROUP BY cast(youth_name as varchar(max))
這將給我兩列,ICOUNT和yname
我想執行,這將使我yname和第二查詢ICOUNT其中ICOUNT> 1
我一直在這幾個小時現在終於決定尋求幫助。
謝謝大家的快速反應。我完全忘記了Having條款。 –