posts - 82, comments - 269, trackbacks - 0, articles - 1
            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理
          來(lái)源:http://database.ctocio.com.cn/askexperts/216/7618716.shtml?ticket=ST-1398-lQWKhI5ZqQLqVscF67h8

          select distinct
                 cust.fname
               , cust.lname
               , cust.phone
            from orders as o
          inner
            join customers as cust
              on cust.id = orders.cust_id
           where o.date_ordered =
                 date_sub( current_date
                         , interval
                 7 - 2 * floor(dayofweek(current_date)/7)
                   + floor((dayofweek(current_date)-2)/7)
                               day )
             and o.date_shipped is null

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 墨脱县| 寻乌县| 连山| 宽城| 略阳县| 铁岭县| 惠水县| 舞钢市| 如东县| 华蓥市| 密山市| 南城县| 荔浦县| 那坡县| 辽中县| 将乐县| 治县。| 桓台县| 乌拉特后旗| 卢湾区| 漳平市| 寿宁县| 隆林| 滨海县| 长宁区| 北京市| 曲靖市| 崇阳县| 黄骅市| 清丰县| 马鞍山市| 万荣县| 寿阳县| 航空| 嘉鱼县| 营口市| 南召县| 新津县| 那坡县| 通河县| 泰和县|