SELECT reg.name,
SUM(donatecheck.donate)
FROM reg,
donatecheck
WHERE reg.email = donatecheck.email
AND SUM(donatecheck.donate) > 4000
GROUP BY reg.name;
有两个表reg
,donatecheck
我想totaldonation
从每个人的数据库中获取名称,并且不重复
..donatecheck
表attributes==email
,和catagory
donation
reg
table==name,email