SQL Partial Full Outer Join
问题 This is a continuation of my previous post here. I have a table like this: Name Id Amount Name1 1 99 Name1 1 30 Name1 9 120.2 Name2 21 348 Name2 21 21 Name3 41 99 If I run this query, thanks to Juan Carlos Oropeza: SELECT [Name], [Id], count([Amount]) as 'Count' FROM table1 GROUP BY [Name], [Id] I get this table: Name Id Count Name1 1 2 Name1 9 1 Name2 21 2 Name3 41 1 Now I have another table like this: Id Return Amount 1 100 1 134.3 9 912.3 9 21 21 23.23 41 45 If I run this query: SELECT [Id