三列,姓名、证书、等级
红色代码的空格去掉
Dim q As new QueryBuilderq.TableName = "统计"q.SelectString = "select a.姓名, 证书 fr om {表C} as a inner join (Select 姓名, min(等级) as 等级 fr om {表C} where 姓名 is not null group by 姓名) as b on a.姓名=b.姓名 and a.等级=b.等级"q.BuildMainTable = Tables("统计")