blob: c1a2e77c23e3e9f8efbaf390178a8a73f24d4012 [file] [log] [blame]
-- cityid is coming from two tables, use different case than in the file
select cust_id,
count(Cust_Id)
from
(
select *
from
(
select a.CustomerID,
b.NAME
from `customer.json` a,
`city.json` b
where
a.cityid = b.CITYID
order by
a.customerid
) as dt(cust_id, name)
)
group by
cust_id
having
count(cust_id) = 1
order by
CUST_ID;