A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
If you replace the SUM with a star and remove the GROUP BY:
Select`*
,SUM(sd.ShipCost)
FROM __ShipmentsData sd
JOIN __ShipLineItemInfo sl
ON sd.ShipId = sl.ShipId
You will understand what is going on.
Here is a query that gives you result that you want:
SELECT sl.ShipId, sd.ShipCost
FROM (SELECT DISTINCT ShipId FROM __ShipLineItemInfo) AS sl
JOIN (SELECT ShipId, SUM(ShipCost) AS ShipCost
FROM __ShipmentsData
GROUP BY ShipId) AS sd ON sd.ShipId = sl.ShipId