分组查询范围 [英] Grouping Query Range
问题描述
嗨
我有一个查询按天数将人数分组,得到以下结果:
天 - -------人数
1 ---------------- 100
2 ---------------- 150
3 ---------------- 175
4 ---------------- 200
5 ------- --------- 225
6 ---------------- 75
7 ---------------- 100
但是我想将这样的数据分组:
天-----------人数
0 - 1 ------- --------- 100
2 - 3 ---------------- 325
4 - 5 ---------------- 425
6 + ------------ ---- 175
任何想法怎么做?
谢谢
嗨
我有一个查询组,人数为r天数并获得以下结果:
天--------人数
1-- -------------- 100
2 ---------------- 150
< br $>
3 ---------------- 175
4 ------------ ---- 200
5 ---------------- 225
6-- -------------- 75
7 ---------------- 100
但是我想把这样的数据分组:
天-----------人数
0 - 1 ---------------- 100
2 - 3 ---------------- 325
4 - 5 ---------------- 425
6 + ---------------- 175
任何想法如何这样做吗?
谢谢
展开 | 选择 | Wrap | 行号
< blockquote class =post_quotes>展开 | 选择 | Wrap | 行号
感谢您的帮助,但只是看看在这我可以告诉它不会工作!!
我认为这不是一个简单的过程?还有其他想法吗?
实际上,这是一个非常简单的过程。将SQL语句复制并粘贴到查询的SQL视图中,用您的表名替换该演示。只是为了我自己的好奇心,是什么让你说它即使你没有尝试也不会工作?
Hi
I have a query which groups Number of People together by number of days and gets the following result :
Days-------- Number of People
1----------------100
2----------------150
3 ---------------- 175
4----------------200
5----------------225
6----------------75
7----------------100
However I would like to group the data like this:
Days ----------- Number of People
0 - 1----------------100
2 - 3----------------325
4 - 5---------------- 425
6+----------------175
Any ideas how to do this?
Thanks解决方案Hi
I have a query which groups Number of People together by number of days and gets the following result :
Days-------- Number of People
1----------------100
2----------------150
3 ---------------- 175
4----------------200
5----------------225
6----------------75
7----------------100
However I would like to group the data like this:
Days ----------- Number of People
0 - 1----------------100
2 - 3----------------325
4 - 5---------------- 425
6+----------------175
Any ideas how to do this?
Thanks
Expand|Select|Wrap|Line Numbers
Expand|Select|Wrap|Line Numbers
Thanks for your help but just by looking at this i can tell its not going to work!!
I assume this is not a simple process? Any one any other ideas?Actually, it is a very simple process. Copy and Paste the SQL Statement into the SQL View of a Query, substituting your Table name for the demo. Just for my own curiosity, what makes you say it won''t work even though you haven''t tried it?
这篇关于分组查询范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆