with current('account','total') as
 select account_number,sum(balance)  
 from account 
 group by balance 
 order by balance desc
select * from current
错误信息:[Err] 1064 - 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 'with current('account','total') as
 select account_number,sum(balance)  
 from' at line 1

解决方案 »

  1.   

    第一行出错了。。'with current('account','total')
      

  2.   

    MySQL 不支持 WITH...AS 子句
      

  3.   

    check the manual that corresponds to your MySQL server version for 开始我还想你们怎么看出来时mysql 
      

  4.   

    SQL的语句本身就有问题:
    分组语句就不对,只能使用:
    select balance,sum(balance)  
     from account 
     group by balance 
     order by balance desc

    select account_number,sum(balance)  
     from account 
     group by account_number
     order by account_number desc