Table 1
create table person (
doc text primary key,
etc ....
city text );
90000 rows
create table sales (
doc text,
etc .....
);
300000 rows
select p.city,count(*) from sales s, person p where s.doc = p.docgroup by p.city;
Anyone help-me?