I am using postgresql to display QA% in my project. Now issue is that, QA% for one of the user is showing wrong data.
this is my calculation I am using to show QA%
(to_char(( (coalesce(s_qa_num,0) + coalesce(s_qa_num_adtl,0))/nullif(coalesce(s_qa_den,0) + coalesce(s_qa_den_adtl,0),0))*100,'999D99')||'%')::character varying as qa_pct
Output from the view I have created
the view I am using for this
the query I run in pgadmin
select * from mystats_in_eligbility.vw_m_quality where empl_id = '329509' AND dte BETWEEN '2019-03-23' AND '2019-09-06' order by dte desc;
Current result for QA% is 97.53% expected result is 96.34%.