而且用了group by就不能排序了

解决方案 »

  1.   

    select a.*,b.* 
    from table1 a inner join table2 b 
    on a.编号 = b.编号
    where b.发送 = 'aaa' 
    order by b.日期
      

  2.   

    select a.*,b.* 
    from table1 a inner join table2 b 
    on a.编号 = b.编号
    where a.接收='aaa' and b.发送 = 'aaa' 
    order by b.日期
      

  3.   

    select * from table1 inner join table2 on table1.编号=table2.编号 where table1.接收人
    ='aaa' and table2.发送人='aaa'
      

  4.   

    正确的记录集应该是
    A1      2004-1-1    aaa
      

  5.   

    就是说接收人是aaa"或者"说发送人是aaa的....不能出现相同编号的..
      

  6.   

    select a.*,b.* 
    from table1 a inner join table2 b 
    on a.编号 = b.编号
    where a.接收='aaa' and b.发送 = 'aaa' 
    order by b.日期