SELECT c.name, count(m.mailid)
FROM Employee
LEFT JOIN mailingSubscriptions as m ON c.Name = m.EmployeeName
GROUP BY c.name;
More Related Contents:
- Count with IF condition in MySQL query
- left join query keep a column empty
- 1052: Column ‘id’ in field list is ambiguous
- Join tables with SUM issue in MYSQL
- MySQL update table based on another tables value
- How can I join multiple SQL tables using the IDs?
- JOIN queries vs multiple queries
- conditional join in mysql
- MYSQL Select MAX Date inside a join statement
- a count for each join – optimisation
- Most efficient way to get table row count
- Combine Multiple child rows into one row MYSQL
- Cumulative sum over a set of rows in mysql
- When to use STRAIGHT_JOIN with MySQL
- Mysql count instances of substring, then order by
- MySQL monthly Sale of last 12 months including months with no Sale
- MySQL join query using like?
- How to find non-existing data from another Table by JOIN?
- LEFT JOIN only first row
- COUNT(*) from multiple tables in MySQL
- Why the rows returns by “explain” is not equal to count()?
- Can I resolve this with pure mysql? (joining on ‘;’ separated values in a column)
- mySQL – Create a New Table Using Data and Columns from Three Tables
- Mysql select where not in table
- MySQL – Using COUNT(*) in the WHERE clause
- MySQL how to join tables on two fields
- Join two tables (with a 1-M relationship) where the second table needs to be ‘flattened’ into one row
- How do I add two count(*) results together on two different tables?
- In what order are MySQL JOINs evaluated?
- How to store a one to many relation in MySQL database?