<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    lqxue

    常用鏈接

    統(tǒng)計(jì)

    book

    tools

    最新評論

    mysql 行變列的例句

    select distinct item.reportoid, item.lineoid,  item.accountoid, sun.amount, mon.amount, tue.amount, wes.amount, thur.amount, fri.amount, sat.amount
    from expenseitem item
    left join (select reportoid, accountoid, lineoid, amount, itemDate from expenseitem
     where itemDate = '2007-11-04' ) sun
     on item.reportoid = sun.reportoid and
      item.accountoid = sun.accountoid and
      item.lineoid = sun.lineoid and
      item.itemDate = sun.itemDate
    left join (select reportoid, accountoid,  lineoid, amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 1) ) mon
     on item.reportoid = mon.reportoid and
      item.accountoid = mon.accountoid and
      item.lineoid = mon.lineoid and
      item.itemDate = mon.itemDate
    left join (select reportoid, accountoid,  lineoid,amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 2)) tue
     on item.reportoid = tue.reportoid and
      item.accountoid = tue.accountoid and
      item.lineoid = tue.lineoid and
      item.itemDate = tue.itemDate
    left join (select reportoid, accountoid,  lineoid,amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 3)  ) wes
     on item.reportoid = wes.reportoid and
      item.accountoid = wes.accountoid and
      item.lineoid = wes.lineoid and
      item.itemDate = wes.itemDate
    left join (select reportoid, accountoid,  lineoid,amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 4)  ) thur
     on item.reportoid = thur.reportoid and
      item.accountoid = thur.accountoid and
      item.lineoid = thur.lineoid and
      item.itemDate = thur.itemDate
    left join (select reportoid, accountoid,  lineoid,amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 5)  ) fri
     on item.reportoid = fri.reportoid and
      item.accountoid = fri.accountoid and
      item.lineoid = fri.lineoid and
      item.itemDate = fri.itemDate
    left join (select reportoid, accountoid,  lineoid,amount, itemDate from expenseitem
     where itemDate = adddate('2007-11-04', 6) ) sat
     on item.reportoid = sat.reportoid and
      item.accountoid = sat.accountoid and
      item.lineoid = sat.lineoid and
      item.itemDate = sat.itemDate
    where item.reportoid = 3712
    order by reportoid, accountoid;

    posted on 2008-07-08 10:52 lqx 閱讀(651) 評論(0)  編輯  收藏 所屬分類: database

    主站蜘蛛池模板: 99久久免费国产精品特黄| 国产AV无码专区亚洲AV琪琪| 亚洲福利电影一区二区?| 亚洲中文字幕久久精品蜜桃| 一级毛片视频免费观看| 麻豆视频免费播放| 亚洲真人无码永久在线| 久久久久亚洲精品美女| 国产亚洲蜜芽精品久久| 人人狠狠综合久久亚洲高清| 亚洲乱码卡三乱码新区| 国内精品久久久久影院免费| 四虎影院免费视频| 在线观看亚洲一区二区| 黄色视频在线免费观看| 国产成人精品免费直播| 亚洲日本久久一区二区va| 亚洲免费在线视频| 国产亚洲精久久久久久无码77777| www成人免费视频| 精品久久久久久亚洲| 亚洲色无码国产精品网站可下载| 毛片免费观看网站| 亚洲av乱码一区二区三区香蕉| 日韩av无码免费播放| 久久久久无码专区亚洲av| 国产精品亚洲色图| 亚洲中文字幕无码久久2017| 99在线视频免费| 亚洲福利视频导航| 毛片免费视频播放| 亚洲一区二区三区免费在线观看 | 一级全免费视频播放| 亚洲AV色香蕉一区二区| 成人无码区免费视频观看| 青娱乐在线视频免费观看| 国产一级高清视频免费看| 一本色道久久综合亚洲精品蜜桃冫| 国产自产拍精品视频免费看| 国产三级在线免费| 亚洲视频在线观看2018|