zoukankan      html  css  js  c++  java
  • oracle Group by 分组查询后,分页

    public Map getInWareHouseReport(int i, int j, InWareHouse inWareHouse) {
            //查询分组后总条数
            String countquery="select WS_SKU_ID,sum(IN_NUMBER),sum(WH_MONEY) from IN_WAREHOUSE p group by WS_SKU_ID";
            //计算结束行
            int m=i+j;
            //分组分页查询
            String sqlString="select * from

    (SELECT rownum as rn, a.* FROM (select WS_SKU_ID,sum(IN_NUMBER),sum(WH_MONEY) from IN_WAREHOUSE p group by WS_SKU_ID ) a)

    where rn>"+i+" and rn<="+m+"";


            List trList = this.excuteSql(sqlString, "inreport");
            List clist = this.excuteSql(countquery, "count");
            int totalProperty = clist.size();
            Map map = new HashMap();
            map.put(TOTAL_PROPERTY, totalProperty);
            map.put(BUSI_LIST, trList);
            return map;
        }

  • 相关阅读:
    Hello World
    查找字符串 fiand
    stdou,write与print()
    python 中 按位 与 & ,| ,^ ,~,
    3*3元素主对角元素之和
    Python random() 函数
    文本颜色设计
    if __name__=="__main__
    join函数
    ProGAN论文的翻译+学习体会
  • 原文地址:https://www.cnblogs.com/lengzhijun/p/4383397.html
Copyright © 2011-2022 走看看