select country_olympic_name,SUM(part_gold) as 'Number of Gold Medals' From games.country,games.participation where participation.country_isocode = country.country_isocode group by country_olympic_name;
我已经收到错误ORA-00923:FROM关键字没有找到预期,不知道为什么,请帮助
解决方法
标识符需要引用双引号(“).单引号(‘)表示一个字符值(而不是”名称“).
因此您需要使用:
SUM(part_gold) as "Number of Gold Medals"
手册中的更多细节:
> http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements003.htm#i42617
> http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements008.htm#i27561