简体   繁体   中英

i have 3 columns , total count , pass count , and fail count , how do i write formula in SQL or SPL if fail count is > 8% its development error

i have 3 columns , total count , pass count , and fail count , how do i write formula in SQL or SPL if fail count is > 8% it is development error?

sample input -
pass count - 3900 , 5500 , 2500
total count - 3920, 5700, 3000
fail count - 20 , 200 , 500
formula for if fail count is more then 8% its sends dev error.

This is simple arithmetic to calculate percentage then apply filter criteria to calculated field, like:

SELECT Counts.*, [FailCount]/[TotalCount]*100 AS PctFail
FROM Counts
WHERE ((([FailCount]/[TotalCount]*100)>8));

Build a report to show that dataset.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM