How To Use Variables In Postgresql A Nested