#Google
Find the total AdWords earnings for each business type. Output the business types along with the total earnings.
table name: google_adwords_earnings

Solution:
select business_type,sum(adwords_earnings) as totalEarnings
from google_adwords_earnings
group by business_type
Output:

SQL Script:
USE [StrataScratch]
GO
CREATE TABLE [dbo].[google_adwords_earnings](
[business_type] [varchar](50) NULL,
[n_employees] [int] NULL,
[year] [int] NULL,
[adwords_earnings] [int] NULL
) ON [PRIMARY]
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 2, 2018, 81)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 10, 2018, 110)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'media', 10000, 2018, 123456789)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 5000, 2018, 1001001)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 2, 2018, 150)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 10, 2018, 87)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 1500, 2018, 5040032)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'transport', 3200, 2018, 7865490)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 10, 2018, 55)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 2, 2018, 130)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 10, 2019, 80)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 2, 2020, 16)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 5, 2018, 130)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 10, 2019, 55)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 7, 2020, 182)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'media', 10000, 2019, 123456789)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'transport', 3200, 2019, 1001001)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'transport', 10000, 2019, 123456789)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'media', 3200, 2019, 1001001)
GO
INSERT [dbo].[google_adwords_earnings] ([business_type], [n_employees], [year], [adwords_earnings]) VALUES (N'handyman', 3, 2019, 78)
GO