Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select
- f.Title,
- TotalArea = Sum(c.Area)
- From Firms f
- Left Join Concessions c on c.FirmID = f.FirmID
- Group By f.Title
- Order by Sum(c.Area) DESC
- From f As Firm In Db.Firms _
- Order By f.Concessions.Sum(Area)
- From c In Concessions _
- Join f In Firms on f.FirmID equals c.FirmID _
- Group by f.Title _
- Into TotalArea = sum(c.OfficialArea) _
- Order by TotalArea Descending _
- Select Title, TotalArea
Add Comment
Please, Sign In to add comment