My table A's mainid is associated with table B's mainid, resulting in the PharmaBatchNo column of table B. The result I want to display is B PharmaBatchNo,SUM(A.ContractAmount), How to write an expression based on the number of rows in Table B?SUM (a. ContractAmount) should be displayed on each line.