Merge Two List of Dict

Peter Otten __peter__ at web.de
Thu Dec 1 04:03:32 EST 2016


Peter Otten wrote:

> If the data stems from a database you can run (untested)
> 
> select B.village_id, sum(A.adop_count) from A inner join B on A.person_id
> = B.person_id;
> 

Oops, I forgot the group-by clause:

select B.village_id, sum(A.adop_count) 
from A inner join B on A.person_id = B.person_id 
group by B.village_id;



More information about the Python-list mailing list