DISTINCT count(*), possible?
DISTINCT count(*), possible?
От:
Matthew Hagerty <matthew@venux.net>
Дата:
Greetings, Can someone tell me how I can get this to work? select DISTINCT count(address1) from aro; returns 240, which is wrong. But this: select DISTINCT address1 from aro; returns 219, which is exactally what I am looking for, minus the query output. I don't need the tuples, just a count of distinct addresses. Thanks, Matthew
Re: [SQL] DISTINCT count(*), possible?
От:
Chris Bitmead <chris@tech.com.au>
Дата:
I can do it as two queries, but I don't know how to do it as one. select count(url) as foo into temp2 from urllink group by url; select count(foo) from temp2; Matthew Hagerty wrote: > > Greetings, > > Can someone tell me how I can get this to work? > > select DISTINCT count(address1) from aro; > > returns 240, which is wrong. But this: > > select DISTINCT address1 from aro; > > returns 219, which is exactally what I am looking for, minus the query > output. I don't need the tuples, just a count of distinct addresses. > > Thanks, > Matthew -- Chris Bitmead mailto:chris@tech.com.au http://www.techphoto.org - Photography News, Stuff that Matters