108
107
SELECT cid, CONCAT(firstname, ' ', surname), COUNT(call_id) FROM t1 LEFT JOIN t2 ON cid=contact_id WHERE firstname like '%foo%' GROUP BY cid ORDER BY surname, firstname;
109
108
cid CONCAT(firstname, ' ', surname) COUNT(call_id)
113
111
create table t1 (foo int);
114
112
insert into t1 values (1);