I would like to loop my query based on each element of an array. And I just want one result from each element out of the query.
Something like this:
array = ['a', 'b', 'c']
For i in array LOOP
SELECT *
FROM table_xyz
WHERE id = i
LIMIT 1
END LOOP;
So that I will have a table result like this:
id | value
-------+--------
a | 123
b | 456
c | 789