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

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

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

    相信自己!

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      26 隨筆 :: 3 文章 :: 13 評論 :: 0 Trackbacks
    select t5.emp_name as sale_name,
           t9.emp_name as cs_name,
           t5.dept_name,
           t5.friend_id,
           t5.friend_name,
           t5.contract_number,
           t5.total_value,
           t5.so_id,
           t5.start_date,
           t5.end_date,
           t5.friend_phone,
           t5.num /*count(*)*/
      from (select t1.cust_id as friend_Id,
                   t1.so_id,
                   t1.emp_id,
                   t2.emp_name,
                   tf.friend_name,
                   t3.dept_name,
                   tf.friend_phone,
                   t1.so_code as contract_number,
                   t1.so_amount as TOTAL_VALUE,
                   t1.so_delivery_date as START_DATE,
                   t1.so_PAYMENT_DATE as END_DATE,
                   t4.num
              from tc_sales_order_m t1,
                   tc_employee t2,
                   tc_department t3,
                   tc_friend tf,
                   (select tss.cust_id, tss.num
                      from (
                            select cust_id, count(*) as num
                              from tc_sales_order_m ts
                             where ts.owner_id = 1
                               and ts.create_time <
                                   to_date('2008-09-27', 'YYYY-mm-dd')
                             group by cust_id) tss
                     where tss.num = 1
                     and tss.cust_id in
                           (select tm2.cust_id
                              from tc_sales_order_m tm2
                             where tm2.owner_id = 1
                               and tm2.create_time <=
                                   to_date('2001-01-05', 'YYYY-mm-dd')
                               and tm2.create_time >=
                                   to_date('2001-01-04', 'YYYY-mm-dd'))) t4
             where t1.owner_id = 1
               and t2.owner_id = 1
               and t3.owner_id = 1
               and tf.owner_id = 1
               and t1.create_time <= to_date('2001-01-05', 'YYYY-mm-dd')
               and t1.create_time >= to_date('2001-01-04', 'YYYY-mm-dd')
               and tf.friend_id = t1.cust_id
               and t1.emp_id = t2.emp_id
               and t2.dept_id = t3.dept_id
               and t1.cust_id(+) = t4.cust_id
               and t3.biz_dept_id = '110'
               and t1.cust_id = t4.cust_id
               and t3.DEPT_CODE not like '0112%'
               and t3.DEPT_CODE not like '0113%') t5,
           (select t4.emp_name, t2.friend_id
              from rel_friend_emp t2, tc_department t3, tc_employee t4
             where t2.emp_id = t4.emp_id
               and t3.dept_id = t4.dept_id
               and t2.owner_id = 1
               and t3.owner_id = 1
               and t4.owner_id = 1
               and t2.is_self = 1
               and t3.biz_dept_id = '130') t9
     where t5.friend_id = t9.friend_id(+)
    posted on 2008-09-27 14:24 北極雪 閱讀(310) 評論(0)  編輯  收藏 所屬分類: 數據庫
    主站蜘蛛池模板: 无套内射无矿码免费看黄| 日本亚洲免费无线码| 一级毛片免费播放试看60分钟| 成人午夜性A级毛片免费| 久久亚洲国产成人影院| 成人影片麻豆国产影片免费观看| 免费看黄的成人APP| 亚洲色欲久久久综合网| 亚洲另类视频在线观看| 97在线观看永久免费视频| 亚洲伊人久久精品影院| 中文字幕在线免费看| 无码国产精品久久一区免费| 亚洲中文字幕视频国产| aa级女人大片喷水视频免费| 亚洲级αV无码毛片久久精品| 狠狠色伊人亚洲综合网站色| 在线成人a毛片免费播放| 色五月五月丁香亚洲综合网| 亚洲人成网站18禁止一区| 亚洲综合无码一区二区痴汉| a级片免费在线播放| 亚洲欧洲日产国产综合网| 春暖花开亚洲性无区一区二区| 婷婷亚洲天堂影院| 国产亚洲国产bv网站在线| 91大神免费观看| 亚洲中文字幕无码久久| 亚洲AV无码不卡在线观看下载| 你是我的城池营垒免费看 | 永久免费毛片在线播放| 亚洲av乱码一区二区三区按摩 | 亚洲AV无码乱码在线观看富二代| 国产成人精品久久亚洲高清不卡| 免费一级毛片不卡在线播放| 国产亚洲精品免费视频播放| 亚洲国产中文在线视频| www.91亚洲| 久久综合给合久久国产免费| 亚洲hairy多毛pics大全| 日韩视频免费在线|