每个人的D短信和W短信是相对应的,代表到达任务地点和完成任务。p和s代表两种不同的任务。要求显示系统日期内最新的一对任务

解决方案 »

  1.   


    在图片上点右键--属性--复制URL--新开一个浏览器页面--粘贴到地址栏--回车--然后回来CSDN刷新页面,或者直接在新开的页面看图。
      

  2.   

      SELECT DISTINCT NAME 姓名,
     ( select max(arrivetime) from inbox where arrivedate='10-09-01'  and left(msg,1)='D'and mbno=tel1) 到达时间,   
             ( select msg from inbox where arrivedate='10-09-01'  and arrivetime=( select max(arrivetime) from inbox where arrivedate='10-09-01'  and left(msg,1)='D'and mbno=tel1)) 到达短信,   
             ( select max(arrivetime) from inbox where arrivedate='10-09-01'  and left(msg,1)='W'and mbno=tel1) 完成时间,   
             ( select msg from inbox where arrivedate='10-09-01'  and arrivetime=( select max(arrivetime) from inbox where arrivedate='10-09-01'  and left(msg,1)='W'and mbno=tel1)) 完成短信,   
             fz 分组 
        FROM inbox,   
             txl  
       WHERE mbno = tel1  
    order by name 
      

  3.   

    [[email protected]]我的邮箱,解决的朋友可以放到邮箱里[/email]