Dim ft As String=Tables("河北省_志愿填报").filter
If ft>"" Then
ft=" and " & ft
End If
output.show(ft)
output.show(Vars("筛选条件"))
Dim b As New SQLGroupTableBuilder("专业统计","河北省_志愿填报")
b.C
b.AddTable("河北省_志愿填报","专业_代码","基本库_本科专业","专业代码") '添加统计表
b.Groups.AddDef("科类") '根据产品名称分组
b.Groups.AddDef("学科门类代码") '根据产品名称分组
b.Groups.AddDef("学科门类") '根据产品名称分组
b.Groups.AddDef("专业类代码") '根据产品名称分组
b.Groups.AddDef("专业类") '根据产品名称分组
b.Groups.AddDef("专业_代码") '根据产品名称分组
b.Groups.AddDef("专业_名称") '根据产品名称分组
b.Totals.AddDef("专业_代码", AggregateEnum.Count, "学校数")
b.Totals.AddDef("计划_21", "计划人数")
b.Filter = Vars("筛选条件") & ft
b.Build '生成统计表
MainTable = Tables("专业统计") '打开生成的统计表
Dim jb As New SQLJoinTableBuilder("专业统计2","专业统计")
Dim Cols1() As String = {"科类","专业代码"}
Dim Cols2() As String = {"科类","专业代码"}
jb.AddTable("专业统计",Cols1,"基本库_专业热度",Cols2)
jb.AddCols("{专业统计}.*","热度_烈度")
Dim jb2 As New SQLJoinTableBuilder("专业统计2","基本库_专业热度")
jb2.C
'Dim Cols1() As String = {"科类","专业代码"}
'Dim Cols2() As String = {"科类","专业代码"}
jb2.AddTable("专业统计",Cols1,"基本库_专业热度",Cols2)
jb2.AddCols("{专业统计}.*","热度_烈度")
jb.Merge(jb2) '组合jb2
jb.Build()
MainTable = Tables("专业统计2")