Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with countf as (
- select nationid, count(*) as c from customer
- group by nationid
- ),
- maxf as ( select max(nationid) from customer )
- select c.customerid, c.nationid from customer c, countf cf, maxf m
- where c.nationid = cf.nationid
- and cf.c = m
- cf.c = ( select max(nationid) from customer )
- cf.c in maxf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement