Share this Page URL

Chapter 9. Extending Your Use of Queries > Understanding the Basics of SQL - Pg. 310

Extending Your Use of Queries 310 SELECT MarketingCampaigns.Country, MarketingCampaigns.CampaignBudget, Sum(CampaignExpenses.AmountSpent) AS SumOfAmountSpent FROM MarketingCampaigns INNERJOIN CampaignExpenses ON MarketingCampaigns.CampaignID = CampaignExpenses.CampaignID GROUP BY MarketingCampaigns.Country, MarketingCampaigns.CampaignBudget ORDER BY MarketingCampaigns.Country; The SELECT keyword indicates that the query is a select query. The SELECT statement identifies the fields included in the query, with each field separated by a comma. The SELECT statement also includes the expression that's used to define the summary field we included,