USE geo;
select country_code,country_name,seas
from (
select joined.country_name , joined.car_code country_code, count(*) as cnt,
(select VALUE g.joined.sea_name from g) as seas
from (select y.name as country_name, {'sea':s.name} sea_name, y.`-car_code` as
car_code
from world x, x.mondial.country y, x.mondial.sea s, split(s.`-country`, "
") cc_list
where cc_list = y.`-car_code`) joined
group by joined.country_name, joined.car_code
group as g) T
where cnt >= 2
order by cnt desc;
--Duration of all jobs: 0.582 sec
评论