I am trying to achieve as example below can someone help me out please.
now I am doing like this
CREATE TABLE transfers
id serial,
init_by varchar(50),
init_to varchar(50),
to_location varchar(50),
from_location varchar(50)
SELECT id, init_to, to_location as location
FROM transfers WHERE init_by = 'abc';
SELECT id, init_from, from_location as location
FROM transfers WHERE init_to = 'abc';
Now I need to query 2 times and then merge both results. How can I achieve it in single query Thanks in advance.