I want to get the output of the following nested query into a variable in the bash script as follows.
count=SELECT count(*) FROM a
WHERE TRIM(REQUEST_STATUS) IN ('d','e','v') AND
(abc IS NULL) AND EXISTS (SELECT 1 FROM n WHERE LOWER(NAME)=LOWER(a.LOGINNAME)));
please help.