count rows:
SELECT * FROM Table1 LEFT JOIN (SELECT Level1ID, COUNT(Level2ID) AS Total FROM Table2 GROUP BY Level1ID) AS RelatedTable ON Table1.Level1ID = RelatedTable.Level1ID WHERE SomeColumn = Somethingcount sum:
SELECT * FROM Table1 LEFT JOIN (SELECT Level1ID, SUM(Bonus) AS TotalBonus FROM Table2 GROUP BY Level1ID) AS RelatedTable ON Table1.Level1ID = RelatedTable.Level1ID WHERE SomeColumn = Something