I am trying to do a subquery in Looker that returns the assignee name from the person table where the person ID equals the assignedtoperson ID
I have tried to do a limit 1, but that just returns the first value for person in every row
SELECT
"ID",
(SELECT
p."NAME"
FROM
view_321782990.person AS p, view_321782990.request AS r
WHERE
p."ID" = r."ASSIGNEDTOPERSON")
FROM view_321782990.request
I wanti it to return the Name of who was assigned to the ticket, doing
SELECT
p."NAME", r."ID"
FROM
view_321782990.person AS p, view_321782990.request AS r
WHERE
p."ID" = r."ASSIGNEDTOPERSON"
returns what I want, however, I need to do the subquery this way because of how looker interprets SQL