如何计算多个标准 [英] How to get count of multiple criteria

查看:62
本文介绍了如何计算多个标准的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据库,所有公司必须符合3项要求才能符合要求。我需要知道不合规的公司总数中有多少不符合要求1,有多少不符合要求2,有多少不符合要求3.可能有变化 - 例如,公司A符合要求1但不符合2& 3; B公司符合要求1& 3,但不是2等。


这些数量需要根据不合规公司的总数转换为百分比。


如何在查询或报告中设置此信息以显示此信息?


非常感谢您的帮助。


Yappy

I have a database where all companies must meet 3 requirements in order to be in compliance. I need to know out of the total number of companies that are not in compliance how many do not meet requirement 1, how many do not meet requirement 2, and how many do not meet requirement 3. There may be variations - for example, company A meets requirement 1 but not 2 & 3; company B meets requirement 1 & 3 but not 2, etc.

These counts need to be converted into percents based on the total number of companies who are not in compliance.

How can I set this up in a query or report to show this information?

Your help is much appreciated.

Yappy

推荐答案

Yappy,


使用汇总查询来计算您的计数,例如:
Yappy,

Use an aggregate queries to get your counts, something like:
展开 | 选择 | Wrap | 行号


感谢您快速回复。我相信你的答案可以解决我的问题,但我不会说SQL。我只知道如何从我的表中设置基本查询和报告。


该表包含以下字段:

CompanyName

CWR已收到 - 这是一个是/否字段

H& S已批准 - 这是一个是/否字段

已批准的责任 - 这是一个真/假字段


公司必须满足上述所有要求才能符合要求。我需要设置一个查询或报告,向我显示不符合规定的公司总数。有多少人不符合CWR收到的要求,有多少人不符合H& S批准的要求,有多少人不符合责任认可要求。


我希望这有助于澄清。


谢谢,

Yappy
Thanks for replying so quickly. I am sure your answer would solve my issue but I don''t speak SQL. I only know how to set up basic queries and reports from my tables.

The table contains the following fields:
CompanyName
CWR Received - this is a Yes/No field
H&S Approved - this is a Yes/No field
Liability Approved - this is a True/False field

The company must meet all of the above requirements to be in compliance. I need to set up a query or report that will show me the total number of companies not in compliance & how many do not meet the CWR Received requirement, how many do not meet the H&S Approved requirement, and how many do not meet the Liability Approved requirement.

I hope this helps to clarify.

Thanks,
Yappy


冒着厚颜无耻的风险 - 学习SQL的时间......


尝试创建查询并将其置于SQL视图中:
At the risk of sounding cheeky - time to learn SQL...

Try creating a query and placing this in the "SQL View":
展开 | 选择 | 换行 | 行号


这篇关于如何计算多个标准的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆