Question: Please show the employee last names that serves no more than 20 customers.
Schema: create table employee (employeeid varchar, PRIMARY KEY (employeeid)); create table customer (lastname varchar, supportrepid varchar, PRIMARY KEY (lastname))
SQL: select t1.lastname from customer as t1 join employee as t2 on t1.supportrepid = t2.employeeid group by t1.supportrepid having count(*) <= 20