作者yld (努力中!!)
看板Database
标题[SQL]SQL语法请教=>使用My SQL
时间Thu Oct 18 21:11:46 2007
不好意思请教一下
我是My SQL的新手,这问题已经困扰我很久了
select temp.week_ending,temp.total_sold
from
(select week_ending,sum(units_sold) as total_sold
from sold
group by week_ending) as temp
where temp.total_sold =
(select max(total_sold)
from
(select week_ending,sum(units_sold) as total_sold
from sold
group by week_ending) as temp2
)
以上的语法我用於ACCESS与SQL Server中皆可以RUN
但是用在MY SQL中就不能RUN了会出现下列字句
You have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version
for the right syntax to use near
'select week_ending,sum(units_sold) as total_sold from
想请问一下是版本问题还是My SQL不支援此种查询呢
谢谢!!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 163.22.32.128