SQL计算每天的期初、入库、出库、结存数
这是一道面试题,答案如下:-- 更改sql_mode否则会报错SET sql_mode='';WITH table_test AS ( SELECT '2020-10-1' AS ru_date,200 AS ru_ku, 10 AS chu_ku UNION SELECT '2020-10-2' AS ru_date,10 AS ru_ku, 30 AS chu_ku UNION SELECT '2020-10-5' AS ru_date,50 AS ru_ku, 10 AS..
原创
2022-03-31 20:45:12 ·
5994 阅读 ·
7 评论