SQL LEAD() PARTITION BY ISSUE

I have a JOIN on the following select statement in injected sql

 

JOIN (SELECT
g.id,
lead(g.id) over (partition by g.sid_grade ORDER BY g.ordering) AS next_id
FROM
grade g
WHERE
g.status = 'Active')

 

If I omit the g. prefix in the partition by clause, sid_grade is not found in the table

3 comments
Comment actions Permalink

This is in injected sql

0
Comment actions Permalink

Open File | Settings | Languages & Frameworks | SQL Resolution Scopes and map your project/files with a particular schema.

See some more info at https://www.jetbrains.com/help/phpstorm/settings-languages-sql-resolution-scopes.html

0
Comment actions Permalink

That's done. As soon as I add the prefix it works, along with all the other sql which is resolved

0

Please sign in to leave a comment.