我使用同一個select查詢兩次。我怎樣才能把它變成一個查詢或別名?如何將選擇查詢包裝爲一個別名
我的代碼:
select *
from
(
select store, count(*) as quantity
from bbb
where MONTH(date) = 12
group by store
) as december
having quantity = (select MAX(maxi)
from
(
select store, count(*) as maxi
from bbb
where MONTH(date) = 12
group by store) as december
)
什麼是'ilosc'? – Quassnoi
應該有數量 – kaszkietoo
那'count'爲空:$ – bonCodigo