Stačí upravit jednu z odpovědí, abyste získali zákazníky bez objednávek –
Select c.name,
Sum(Case When o.year == 2008 Then price Else 0 End) cy2008,
Sum(Case When o.year == 2009 Then price Else 0 End) cy2009,
Sum(Case When o.year == 2010 Then price Else 0 End) cy2010
From Customers c left outer join
Orders o on o.customer_id = c.customer_id
Group By c.name