The following query does take the most and least district by num of customers. I tried to divide the task into grouping first by count of customers, then limiting by 1.
But why is the union not working?
SELECT
A.district,
COUNT(DISTINCT C.customer_id) cust_cnt
FROM
address A
GROUP BY
A.district
ORDER BY
cust_cnt
LIMIT 1
UNION
SELECT
A.district,
COUNT(DISTINCT C.customer_id) cust_cnt
FROM
address A
GROUP BY
A.district
ORDER BY
cust_cnt desc
LIMIT 1