Use a dereference in a select statement

Is it possible to do something like this?

SELECT(daily_schedule[Unique_User_Table_ID].[email], [Unique_User_Table_ID].[Emp_Role] = “Manager”)

The dereference in the second part of the select statement works (using Emp_Role) but trying to select email in the first part of the select statement returns a column not found error.

No, that isn’t allowed.

It seems you are trying to get emails for Managers. How does daily_schedule play into that selection?

manager that are scheduled for that day, at that store.

I guess I could do something like

SELECT(user_table[email], IN([unique_user_id], daily_schedule[user_id]))

Yes, but don’t forget to AND in the check for Managers - [Emp_Role] = “Manager”