我如何计算MS Access中每个月的利润? [英] How do I calculate a profit for each month in MS Access?
问题描述
我很新,并且正在为我的公司创建数据库。
我有一个'Jobs'表,其中包含以下字段: 我想知道的是什么是最好的方式/我如何计算表格或查询每个月的整体利润? 请大家帮忙,数据库真的会出现,除此之外,这个数据库还是非常强大的。 您想查找匹配特定年份/月份的所有行,并将该月的所有利润条目汇总在一起总共? 如果是这样,试试这个: 或者,如果您想要检索一年中所有月份的信息,请尝试以下内容: I'm quite new to access and I am currently in the process of making a database for my company. I have a 'Jobs' table with these fields in: What I want to know Is what is the best way/ how do I calculate either in a form or query the overall profit for each month? Please help, the database is really coming along, apart from this is well entruely stuck on. You want to find all rows matching a specific year / month, and add together all the profit entries for that month to get a total? If so, try this : Or, if you want to retrieve this information for all months in one go, try this :
这篇关于我如何计算MS Access中每个月的利润?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
select sum (利润),年份= 2013,月= 02
从年份中选择年份,月份,总和(利润)月
select sum(profit) from Jobs where year = 2013 and month = 02
select year, month, sum(profit) from Jobs group by year, month