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;
I have been getting the error ORA-00923: FROM keyword not found where expected and do not know why, please help
Identifiers need to be quoted with double quotes ("
). Single quotes ('
) denote a character value (not a "name").
Therefor you need to use:
SUM(part_gold) as "Number of Gold Medals"
More details in the manual:
Check reserved words. This was my issue. For whatever reason using "size" as a column alias caused oracle to spit that exact error out and it had me scratching my head for a while.
select 1 size, 1 id from dual
In my case, I had this query
SELECT BANK_NAME
DECODE (SWIFT_CODE, 'BRDEROBU', 'BRD',
'NO RESULT') RESULT
FROM BANK_GAR;
As you may see, I didn't had the comma after the SELECT BANK_NAME
line.
The correct query is:
SELECT BANK_NAME,
DECODE (SWIFT_CODE, 'BRDEROBU', 'BRD',
'NO RESULT') RESULT
FROM BANK_GAR;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With