Re: [SQL] Aggregating by unique values

2010-12-14 Thread Lee Hachadoorian
Perfect. Thanks, --Lee On 12/14/2010 03:23 AM, Filip RembiaƂkowski wrote: try select zip, count(distinct id) from customer_service_date group by zip; 2010/12/14 Lee Hachadoorian Hello,

Re: [SQL] Aggregating by unique values

2010-12-14 Thread Filip RembiaƂkowski
try select zip, count(distinct id) from customer_service_date group by zip; 2010/12/14 Lee Hachadoorian > Hello, > > I'm trying to count customers who have received services by ZIP code, > but I want to count each customer only once even though customers may > have received services on multiple

[SQL] Aggregating by unique values

2010-12-13 Thread Lee Hachadoorian
Hello, I'm trying to count customers who have received services by ZIP code, but I want to count each customer only once even though customers may have received services on multiple dates, and therefore appear in the table multiple times. There *is* a separate customers table, but because of dirty