how to use join in one to many relationships code example
Example 1: sql join one to many
SELECT *
FROM Parent P
INNER JOIN Child C
ON C.ParentId = P.ParentId
Example 2: sql join one to many
SELECT P.Name
, P.Address
, SUM(C.Amount)
FROM Parent P
INNER JOIN Child C
ON C.ParentId = P.ParentId
GROUP BY P.Name
, P.Address