表格1:
创建表Program_T (AccountName varchar(150)not null unique, ProgramID int不为null, 收入int, 倡导者int, 股票int, 转换int, 印象……
我想你想要:
select a.EcommercePlatform, Avg(p.Revenue) grom Program_T p join Account_T a using (accountName) group by a.EcommercePlatform;
笔记:
JOIN
FROM
select
where
为此,代码应如下所示:
Select Avg(Revenue), EcommercePlatform From Program_T inner join Account_T on Program_T.AccountName=Account_T.AccountName group by EcommercePlatform;
这应该工作得很好。