0
我想寫一個SQL查詢同一組數兩個條件,將展現給如何在
1)名稱以類「myTeam」
2)「錯誤」
每個組件3)本月打開了多少個錯誤,以及有多少錯誤是來自該組的後驗語?
這裏是我的代碼:
select
histories.component_path,
count distinct bug_id as id1 from buganizer.metadata.latest WHERE (histories.component_path LIKE 'myTeam >%' And type_id = 'BUG' And (date - Now() < 30)) as total_bugs,
count distinct bug_id as id2 from buganizer.metadata.latest WHERE (histories.component_path LIKE 'myTeam >%' And type_id = 'BUG' And status_id = 'VERIFIED') as verified_bugs
我怎樣才能使這個短多格式正確?
你真的應該向我們展示的表結構與一些樣本數據一起。 –
如果這個工程,那麼它不是MySQL – Strawberry
@Strawberry我不認爲這個代碼工作..不是SQL ..太 – scaisEdge