sql 求指定时间段的最大值

做个备案

select max(if(ldate>'2012-09-31',ii,0)) as 'minii'

 from log_inventory where  pa='P/A' and pn='000001' and ldate between '2012-01-01' and '2012-12-31';

猜你喜欢

转载自blog.csdn.net/netcy/article/details/8364755
今日推荐