我希望得到总和(进球)这两支队伍从头到尾的联盟 如果我发送查询[team-Id] 1& 2将返回3-1 如果我发送查询[team-Id] 2& 3不应该返回任何东西
Tour-Id, Match Id, Team-Id, Goals
1 1 1 1
1 1 2 1
1 1 1 1
1 1 1 1
1 2 1 1
1 2 3 1
答案 0 :(得分:0)
简单的分组和总和将有助于获得结果
public string Name { get; set; }
public string Age { get; set; }
public static IForm<MyForm> BuildForm()
{
return new FormBuilder<LlegadaBusForm>()
.Field(nameof(Name)
.Field(new FieldReflector<MyForm>(nameof(Age))
.SetType(null)
.SetDefine(async (state, field) =>
{
var data = await GetData(state.Name);
foreach (var o in data)
{
field
.AddDescription(o, o)
.AddTerms(o, o);
}
return true;
})
.Build();
}
Jacobr365提出的好点,你试过了什么?