标签: sql union
这是我的尝试:
(select p.Id, p.Name, count(g.Day) from Points p, Game g where p.Id = g.Id group by p.Id, p.Name) union (select p.Id, p.Name, 0 from Points p where p.Id not in (select g1.Id from Game g1));
它不能用于计数,只能用和。为什么呢?