Search code examples
amazon-web-servicesinner-joinamazon-athenapresto

AWS Athena (Presto) - inner join syntax


What is wrong with this statement?

select e.*
FROM 
    edgar_revenue as e,
    INNER JOIN xbrl as x
    ON x."cik" = e."cik"

line 4:5: mismatched input 'INNER'. Expecting: '(', 'LATERAL', 'UNNEST',

enter image description here

enter image description here


Solution

  • I suspect it is the comma(,) after e

    SELECT e.*
    FROM 
    edgar_revenue AS e
    INNER JOIN xbrl AS x
    ON x."cik" = e."cik"