美好的一天。SQL:可能在一個案件內的案件內計數嗎?
下面是一個關於我試圖實現的圖像。
在一個表中有兩個字段,一個是ID,一個是Type。
我想出一張圖片描繪了千言萬語,所以請檢查下面
我試圖與案件和其他的東西了一些東西,但沒有奏效。
有幾件事要注意:由於某些限制,我們不能使用臨時表,插入或刪除。
數據樣本:
ID Type
3 bad
2 zeal
4 tro
3 pol
2 tro
2 lata
4 wrong
3 dead
2 wrong
3 dead
4 wrong
3 lata
2 bad
2 zeal
請提供您的查詢...和小數據樣本。 – Devart
@ Devart,在這一點上,我放棄了我試過的每一個查詢,我會附上一個數據樣本。 – Dansmith
什麼是預期的結果? –