日期:2014-05-18 浏览次数:20395 次
SELECT a.Id, a.Name, b.C1, b.C2 FROM NoverlName AS a INNER JOIN Click AS b ON a.Id = b.Nid AND b.Year = 2012 AND b.Mon = 3
SELECT a.Id, a.Name, b.C1, b.C2,sum(b.C1+b.c2) as total FROM NoverlName AS a INNER JOIN Click AS b ON a.Id = b.Nid AND b.Year = 2012 AND b.Mon = 3 group by a.Id, a.Name, b.C1, b.C2