我有一个包含三张纸的Access文件(每张纸属于一个客户),每张纸包含25个星期的9个产品的订单。
我希望将这3种产品中的每种产品的总和存储12个星期。
例如:
我怎么能对数据库进行一些操作(比如列上的总和)并将它们存储在集合中?
像这样的东西。
List <Integer> result=selectFrom(customer1).list(customer1.product1);
double theSum=sum(result,c->c.intValue());
另外一个选项:
int theSum=(int) selectFirstValue(int.class,"SELECT SUM (product1) FROM customer1;");