
結果:JH表最大的日期,且在此日期后出貨數量小計
uj5u.com熱心網友回復:
select tb.代碼, tb.進貨日期,(select isnull(sum(數量),0) from ch where ch.代碼 = tb.代碼 and ch.出貨日期 >= tb.進貨日期) as 數量
from (
select 代碼, max(進貨日期) as 進貨日期
from jh
group by 代碼
) tb
uj5u.com熱心網友回復:
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/34507.html
標籤:基礎類
上一篇:請教大佬們,iOS問題
下一篇:一個迷惑問題?_??
