fix the sql that is generated from scoping
Merge pull request #9532 from neerajdotname/fix-sql-in-example

In example fix sql that is generated from scoping