Hi.
IMHO, the self-join is the correct solution for the given table layout
(which looks reasonable to me).
Greetings,
Benjamin.
On Wed 2002-07-17 at 09:26:48 +0530, [EMAIL PROTECTED] wrote:
[...]
> > Select companyid, count(*) from CompanyServices where
> > serviceid = 1 or serviceid
ny) 1 services the three
service type.
Let me know if this is not what you wanted.
Bye and Good Luck.
> So how do we handle these situations
>
> -Arul
> - Original Message -
> From: "Francisco Reinaldo" <[EMAIL PROTECTED]>
> To: "Arul" <[E
"MySQL" <[EMAIL PROTECTED]>
Cc: "Arul" <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 3:27 AM
Subject: Re: help me with this query
> Hi,
>
> Select companyid, count(*) from CompanyServices where
> serviceid = 1 or serviceid = 2 or serviceid = 3
>
Hi,
Select companyid, count(*) from CompanyServices where
serviceid = 1 or serviceid = 2 or serviceid = 3
group by companyid
having count(*) = 3
Bye and Good Luck.
--- Arul <[EMAIL PROTECTED]> wrote:
> Hi All
>
> The Table design goes like this
>
> Company Table
>
> companyid
select u.userid , c.companyname from
users u left join company c on (u.companyid = c.companyid)
where u.status = 'ACT'
Best regards,
Mikhail.
- Original Message -
From: "Arul" <[EMAIL PROTECTED]>
To: "MySQL" <[EMAIL PROTECTED]>
Sent: Tuesday, July 02, 2002 5:15 PM
Subject: help me with