sends" table?
> --
> Dave
>
>
> - Original Message -----
> From: "Marco Neves" <[EMAIL PROTECTED]>
> To: "Critters" <[EMAIL PROTECTED]>
> Cc:
> Sent: Thursday, January 19, 2006 4:20 PM
> Subject: Re: Group By over many colums
>
- Original Message -
From: "Marco Neves" <[EMAIL PROTECTED]>
To: "Critters" <[EMAIL PROTECTED]>
Cc:
Sent: Thursday, January 19, 2006 4:20 PM
Subject: Re: Group By over many colums
Hi Critters,
The problem is that as your MySQL is 4.0.21 don't suport the subs
Hi Critters,
The problem is that as your MySQL is 4.0.21 don't suport the subselect
you
would need to do the group.
I was thinking and you have another alternative:
CREATE TEMPORARY table tdata
(SELECT f1 as 'domain' from sends) union all
(SELECT f2 as 'domain' from sends) unio
quot; <[EMAIL PROTECTED]>
To:
Cc: "Critters" <[EMAIL PROTECTED]>
Sent: Thursday, January 19, 2006 3:34 PM
Subject: Re: Group By over many colums
Hi,
To this on I just see a solution, that depends on sub-selects, so it's
available from Mysql 4.1 forward:
SELECT name,
union all (SELECT f2 as domain
>
> Can you spot where I am going wrong?
> -
> David Scott
>
>
> - Original Message -
> From: "Marco Neves" <[EMAIL PROTECTED]>
> To:
> Cc: "Critters" <[EMAIL PROTECTED]>
> Sent: Thursday, January 19, 2006 3:
TECTED]>
To:
Cc: "Critters" <[EMAIL PROTECTED]>
Sent: Thursday, January 19, 2006 3:34 PM
Subject: Re: Group By over many colums
Hi,
To this on I just see a solution, that depends on sub-selects, so it's
available from Mysql 4.1 forward:
SELECT name,count(*) from ((S
Hi,
To this on I just see a solution, that depends on sub-selects, so it's
available from Mysql 4.1 forward:
SELECT name,count(*) from ((SELECT name1 name FROM ) UNION ALL
(SELECT name2 name FROM ) UNION ALL (SELECT name3 name FROM
)) tab GROUP by name;
Hope this solves you problem.
mpneves
I would suggest a union
SELECT name, count(*)
FROM (SELECT name1 as name from mytable union select name2 as name from
mytable union select name3 as name from table)
GROUP BY name
but perhaps there's a better way...
Regards,
Patrick
> -Original Message-
> From: Critters [mailto:[EMAIL