P popzhu Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #1 SELECT COUNT(DISTINCT *) FROM TABLENAME?
S SuperJS Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #3 select count * from tablename groupby colname
U ugvanxk Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #5 select count(*) from ( select allfieldname,count(*) from tablename having count(*)=1 group by allfieldname )
select count(*) from ( select allfieldname,count(*) from tablename having count(*)=1 group by allfieldname )
P popzhu Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #6 我的问题可能不是太清楚,说明一下 SELECT ZIP,COUNT(DISTINCT NAME) FROM TABLENAME GROUP BY ZIP 要求在这个邮编下,所有不同名字的人的个数!
U ugvanxk Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #7 select zip, count(*) from ( select zip,name from tablename having count(*)=1 group by zip,name ) group by zip
select zip, count(*) from ( select zip,name from tablename having count(*)=1 group by zip,name ) group by zip
P popzhu Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #8 ugvanxk你的答案不正确 1, 如果记录重复的NAME,你的方法是统计不进去的,你ONLY统计一条记录的NAME 2/ HAVING COUNT(*) 应该在GROUP BY 后面吧!
G gophie Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #10 select zip, count(*) from ( select zip,name from tablename group by zip,name ) group by zip 可以是可以, 但ACCESS没有类似UNIQUE这样的函数?
select zip, count(*) from ( select zip,name from tablename group by zip,name ) group by zip 可以是可以, 但ACCESS没有类似UNIQUE这样的函数?
Z zhanzehua Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #11 select zip,name,count(*) from tablename group by zip,name 这样难道不行
P popzhu Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #12 不行 这样是同一个邮编同一个户名下有多少人家, 并非同一个邮编下,有多少个不同的人家!
Y yaoluo Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #13 select zip, count(*) from (select distinct (zip+name),zip from tablename) group by zip
Z zhanzehua Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #14 可不可以用中间表 select zip,name into TempTable from tablename group by zip,name select zip,count(*) from TempTable group by zip
可不可以用中间表 select zip,name into TempTable from tablename group by zip,name select zip,count(*) from TempTable group by zip
U ugvanxk Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-09 #15 select zip, count(*) from ( select distinct zip,name //name,zip from tablename ) group by zip 我的应该能通过,在access 试了一下 elect kind,count(*) from (select distinct alpha,kind from tbl_fix_time) group by kind
select zip, count(*) from ( select distinct zip,name //name,zip from tablename ) group by zip 我的应该能通过,在access 试了一下 elect kind,count(*) from (select distinct alpha,kind from tbl_fix_time) group by kind
P popzhu Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-10 #16 我希望不用嵌套语句,直接有类是 count(distinct name) 的效果!