How to write relative to a user in code inside SQl (Postgresql) Custom query

I need to create a report for each employee;

the main database is in SQL (Postgresql) and the table with users is in the Glide table itself


  • If the report is made on the user’s table, then the calculated columns do not work (Rollup)

  • if you do it in SQL inside glide (Custom query), I don’t know how to access the users table in code and make everything work relative to users

I don’t think you can make the custom query dynamic or user specific. The custom query in the glide table needs to be static


Do you know if this works in SQL or the enhancement is only for Big Tables?

I haven’t dealt with Big Tables
you can read about SQL in the documentation

I have a lot of inconvenience with SQL especially with calculations

Sorry, I meant to reply to Eric to ask for his opinion, since I’m not familiar with SQL and can ask the team to update the documentation if needed.

1 Like

Hey @ThinhDinh my experience is limited to playing around with BigQuery. I learned back then you can’t make a query dynamic either through a template column or user specific column… so I didn’t use it in my solution.

I think some of the limitations can be worked around with a matter of creativity… I.e. calculating some value beforehand and then add that static value to a basic column in your table.

Some cases you can feed a joined list through a JS column to get an answer.

When I have time to try it further I will circle back with you :+1:

1 Like