master detail
junno money junno money
2015-11-0630006 40100 2015-11-0630006 40100
2015-11-0630008 38100 2015-11-0630006 40100
2015-11-0630004 37100 2015-11-0630006 40100
2015-11-0530003 36000 2015-11-0630008 38100
2015-11-0530005 35100 2015-11-0630008 38100
합계 186400 2015-11-0630004 37100
2015-11-0630004 37100
2015-11-0630004 37100
2015-11-0630004 37100
2015-11-0530003 36000
2015-11-0530005 35100
2015-11-0530005 35100
합계 451100
select sum(money) from detail as d inner join master as m on d.junno = m.junno
186400원이 나와야되는데 451100이 나오네요 186400원이 나오게 하려면 어떻게 해야되나요?
|