A B两个表, 要用B表的日期条件来统计A表的开始日期到今天的销售-> 得到结果表
select a
select 表A.姓名,sum(数量)
from 表A,
表B
where 表A.姓名=表A.姓名
and 表A.日期>=表B.日期
group by 表A.姓名