Calcutation at SQL level I have this query:

SELECT *
FROM (
  SELECT COUNT(lead_status) as 'Pending files'
  FROM vw_file_registrationlist
  WHERE lead_status_id = "1" || lead_status_id="2" || lead_status_id="4" || lead_status_id="5" || lead_status_id="6"
)A,
(
  SELECT COUNT(lead_status) as 'Completed files'
  FROM vw_file_registrationlist
  WHERE lead_status_id = "3"
)B
, (
  select DISTINCT employee_name
  From vw_file_registrationlist
  where employee_name='anna'
)C


I am getting the result as


Name  Pending files  Completed files
----  -------------  ---------------
anna  3              2


I need to calculate the pending files / total files * 100. Is it possible?
This isn't right,

WHERE lead_status_id = "1" || lead_status_id="2" || lead_status_id="4" || lead_status_id="5" || lead_status_id="6"


What you want is,

WHERE lead_status_id IN (1,2,4,5,6);


Seriously, learn to use whitespace and take some pride in your code. Pick a convention (capitalize all sql tokens, and lower case all of your identifiers) Even if you don't get sql who writes like that..

)a
)b


Where did you even get that from? .. SELECT (...) AS t, (...) AS x whitespace, and AS! That all said, I think you want something like this,

SELECT
  count(lead_status) FILTER (WHERE lead_status_id IN (1,2,4,5,6)) as 'Pending files',
  count(lead_status) FILTER (WHERE lead_status_id = 3) AS 'Completed files',
  any(employee_name = 'anna') AS has_anna
FROM vw_file_registrationlist;