Hello,
I’ve been using Metabase for a while and have been writing SQL queries without much trouble. I’ve run into a case now where I need to restrict the data returned based on the logged-in user.
I want salespeople to only see rows related to their own sales and deliveries. It wouldn’t be appropriate for a salesperson to view other salespeople’s results.
What’s the recommended way to reference the logged-in user in a native SQL query and safely limit the returned rows to only those associated with that user?