34,576
社区成员
发帖
与我相关
我的任务
分享
select
a.id,a.date,a.projectid,a.resourceid,a.entryid,a.click,b.pv
from
(select id,date,projectid,resourceid,entryid,sum(click) as click from 表1 group by id,date,projectid,resourceid,entryid) a,
(select id,date,projectid,resourceid,entryid,sum(pv) as pv from 表2 group by id,date,projectid,resourceid,entryid) b
where
a.id=b.id and a.date=b.date and a.projectid=b.projectid and a.resourceid=b.resourceid and a.entryid=b.entryid