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

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

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

    lqxue

    常用鏈接

    統(tǒng)計

    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

    主站蜘蛛池模板: 免费a级黄色毛片| 免费一级成人毛片| 久久丫精品国产亚洲av不卡| a视频在线免费观看| 亚洲日韩中文字幕日韩在线| 成人免费观看男女羞羞视频| 亚洲?V无码乱码国产精品| 国产亚洲高清在线精品不卡| 亚洲成av人片天堂网老年人| eeuss影院免费直达入口| 亚洲天堂中文字幕在线| 中文字幕无码日韩专区免费| 亚洲另类激情综合偷自拍| 亚洲免费观看在线视频| 亚洲最大福利视频| 国产人成免费视频| EEUSS影院WWW在线观看免费| 亚洲成AV人片在WWW色猫咪| 日韩精品免费视频| 亚洲一区电影在线观看| 四虎免费永久在线播放| 成全视成人免费观看在线看| 色婷婷亚洲十月十月色天 | 中文无码日韩欧免费视频| 亚洲熟妇av一区二区三区漫画| 日本一区二区免费看| 亚洲人成77777在线观看网| 免费国产一级特黄久久| 国产午夜免费高清久久影院| 亚洲国产成人手机在线电影bd | 国产大片免费观看中文字幕| 性生大片视频免费观看一级| 亚洲精品高清视频| 成人看的午夜免费毛片| 国产精品小视频免费无限app| 亚洲精品视频在线观看视频| 性做久久久久免费看| 免费av一区二区三区| 亚洲熟妇无码一区二区三区 | 亚洲色偷偷色噜噜狠狠99| 亚洲国产日韩在线观频|