Re: Is this result set possible

2004-08-03 Thread SGreen
I said something wrong: Count(Distinct ) counts how many unique values appear in a set. NOT how many times each unique value appears in a set. Shawn [EMAIL PROTECTED] wrote on 08/03/2004 10:28:33 AM: > Ok, I haven't completely tested this but I have confidence in the > approach. > > If yo

Re: Is this result set possible

2004-08-03 Thread SGreen
Ok, I haven't completely tested this but I have confidence in the approach. If you have the tables: campaign, foo, bar, example, and another And, each table has something unique per row (like an ID column) Then, this query should give you the number of rows returned from each table because

Is this result set possible

2004-08-02 Thread Scott Haneda
Here is what I am doing now, in mysql 4.x This gives me a name/id list from a table SELECT campaign_name, id FROM campaigns WHERE user_id = 123; This will tell me which of the above name/id's are in use in another table. SELECT distinct(campaign_id) FROM addresses_incampaign WHERE user_id = 123