I have a query that is counting records of a certain type in another table, however, when the count is 0, the join type no longer exists either. How do I get it to return a count of 0 if there is no join? The left join brings me nothing.
for example:
Code:
Select p.Name, p.Size, p.Start_Area, p.End_Area, count(pt.Area_type)
from Places p left outer join Place_types pt on p.name_inst_id = pt.name_inst_id
Count of records inside the records but based on distinct?
I need help. I have a table that I need 7 things from.
So I have a table that i'm retrieving RecordID, UserDate, Ticket#, Description, EnterDate, Area, and Type from (not the real names, but it doesn't matter.
Here's the problem. I need to retrieve records where there are 3+ instances of type that are the same in an area, and then those three+ corresponding ticket# fields should each be different. So it could be like...