Finally, we have the correct answer. This example is an outer join that provides the desired answer to the original business question.
SELECT c.custnum, b.monthly_revenue
FROM sampdb.customer AS c
LEFT OUTER JOIN sampdb2.revenue AS b ON c.custnum = b.custnum
AND b.data_year_month = 199707
WHERE c.district ='K'
AND (c.service_type = 'ABC'
OR c.service_type = 'XYZ')
ORDER BY 1;
This query returns 18,034 rows.