DELETE FROM clientes t1 LEFT JOIN facturas t2 ON t1.idcliente = t2.idcliente WHERE t2.idcliente IS NULL