请问这个实际问题的SQL怎么写
A 介绍 B,C,D ,然后B介绍M,N, C介绍R,P,Q, D没有介绍别人.假如每个人都有2000的营业额,现在我想看每个人的营业额及每个人含下属的营业额之和.这个用SQL要怎么写
CREATE TABLE [dbo].[emp1](
[code] [nvarchar](50) NOT NULL,
[name] [nvarchar](50) NULL,
[jsr] [nvarchar](50) NULL,
CONSTRAINT [PK_tab1] PRIMARY KEY CLUSTERED
(
[code] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
CREATE TABLE [dbo].[sale1](
[id] [int] IDENTITY(1,1) NOT NULL,
[code] [nvarchar](50) NULL,
[moth] [nvarchar](50) NULL,
[qnt] [float] NULL,
CONSTRAINT [PK_sale1] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
INSERT INTO emp1 (code, name,jsr)
SELECT 'A','A','' UNION ALL
SELECT 'B','B','A' UNION ALL
SELECT 'C','C','A' UNION ALL
SELECT 'D','D','A' UNION ALL
SELECT 'M','M','B' UNION ALL
SELECT 'N','N','B' UNION ALL
SELECT 'R','R','C' UNION ALL
SELECT 'P','P','C' UNION ALL
SELECT 'Q','Q','C'
INSERT INTO sale1 (code, qnt)
SELECT 'A',2000 UNION ALL
SELECT 'B',2000 UNION ALL
SELECT 'C',2000 UNION ALL
SELECT 'D',2000 UNION ALL
SELECT 'M',2000 UNION ALL
SELECT 'N',2000 UNION ALL
SELECT 'R',2000 UNION ALL
SELECT 'P',2000 UNION ALL
SELECT 'Q',2000