Dim dt As DataTable = DataTables("表C")
Dim C As List(Of String())
C = dt.GetValues("月份|产品","产品 is not null")
Dim dr As DataRow
For Each Customer As String() In C
dr = dt.find("[月份] = '" & Customer (0) & "' and 产品='" & Customer (1) & "'")
dr("总数量") = dt.Compute("DISTINCT SUM(数量)","[月份] = '" & Customer(0) & "' and 产品='" & Customer(1) & "'")
dr("产品重复笔数") = dt.Compute("COUNT(DISTINCT 产品)","[月份] = '" & Customer(0) & "' and 产品='" & Customer(1) & "'")
Next