计数查询中的函数 [英] Count function in a query

查看:40
本文介绍了计数查询中的函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢目前为止所有的帮助,我的数据库现在开始很好了。


我在一分钟内遇到问题。基本上它是这样的:


我有一个主表到我的数据库,它包含客户信息,包括城市名称。


通过很多对于许多关系,这被连接到一个联系表,该联系表记录与客户的联系。这个表有一个标题为结果的字段,其中记录了''无回复'','稍后调用'或回复'''


我想要做的是运行一个查询,按位置(城市)对呼叫类型进行排序和统计


ie


[PHP]计数呼叫类型城市


3稍后通话伦敦

6无回复伦敦

3稍后再拨打伯明翰[/ PHP]


我希望这对你来说没问题,任何帮助都是很有帮助的!

Thanks for all the help so far, my database is starting to come along well now.

I am having trouble with a query at the minute. Basically it goes like this:

I have a main table to my database which holds client info, including city name.

Through a many to many relationship this is conected to a contact table which records contacts with the clients. This table has a field titled outcome in which either ''no reply'', ''call later'', or returned call'' is recorded

What I am trying to do is run a query that will sort and count call types by location (city)

i.e.

[PHP]Count Call type City

3 call later London
6 no reply London
3 call later Birmingham[/PHP]

I hope this reads ok for you, any help is much appreaciated!

推荐答案

你好


尝试类似的东西这个
Hi

Try something like this
展开 | 选择 | Wrap | 行号






尝试这样的事情
Hi

Try something like this
展开 | < span class =codeLinkonclick =selectAll(this);>选择 | Wrap | 行号


非常仔细地查看数据。

是否有任何无关的空格或其他空白字符?
Look at the data very carefully.
Are there any extraneous spaces or other white-space chars?


这篇关于计数查询中的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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