不好意思,我想請問一下,關於MySQL語法的問題:
1. select first,count(first) as Total from book
group by first;
first Total
Bill 1
Blue 1
Pablo 1
Paloma 1
Ralf 1
Silvia 2
請問我要如何下指令,才能讓Total依大小排列(就是讓Silvia排在第一個)??
2. 查詢價格最高的5本書籍,並列出書名(BookName)、作者(Author)、價格 (Price /*int型態*/)、出版日期(PDate)。
我的指令這樣下的:
select BookName,Author,Price,PDate from book
where max(Price) limit 5
order by Price desc;
結果是錯誤,請問該如何下??
書籤