2011-02-17 156 views

回答

6
select 
    seatpref, 
    count(seatpref) as PrefCount 
from 
    Bookings b 
group by 
    seatpref 
order by 
    count(seatpref) desc 
+0

只需一點點擊敗我!看來我們同意+1 – bhamby 2011-02-17 14:33:12

2

我覺得

SELECT SeatPref, count(SeatPref) AS NumCusts 
FROM your_table 
GROUP_BY SeatPref 
ORDER_BY NumCusts 

應該這樣做。