mysql is going to convert three queries to one

I am guessing you want:

select p.PropertyName,
       (select count(*) as totalTenants 
        from Tenants t
        where t.Prospect = 2 and t.PropertyID = p.PropertyID
       ),
       (select count(*) as totalTenants 
        from Units u
        where u.PropertyID = p.PropertyID
       )
from Properties p
where p.PropertyID = 1;

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top