select d.LEVEL,sum(b.NUM) as total from b(第二张表),d(第一张表) where b.JINGYAN>d.START and b.JINGYANGROUP BY d.LEVEL
最后结果