+-------------+-------+ | countryCode | label | +-------------+-------+ | KM | A | +-------------+-------+ | AD | A | +-------------+-------+ | TH | B | +-------------+-------+ | KM | B | +-------------+-------+
數據如何才能找到平均計數這樣
+-------------+-----+-----+-------+ | countryCode | A | B | count | +-------------+-----+-----+-------+ | KM | 0.5 | 0.5 | 2 | +-------------+-----+-----+-------+ | AD | 1 | 0 | 1 | +-------------+-----+-----+-------+ | TH | 0 | 1 | 1 | +-------------+-----+-----+-------+
*你認爲什麼?你嘗試過什麼嗎? – Rafael
我嘗試了很多東西子查詢加入仍然沒有得到我想要的結果 –
我不明白算術 – Strawberry