问一个SQL语句,关联查询的。该如何解决

问一个SQL语句,关联查询的。
有两个表:
用户表:
userid   username
---------------
1               a
---------------
2               b
---------------
3               c

文章表:
aid           userid         title           addtime
-------------------------------------
1                 1                 标题1           2007-1-1
-------------------------------------
2                 1                 标题2           2007-1-2
-------------------------------------
3                 2                 标题3           2007-1-1
-------------------------------------
4                 2                 标题4           2007-1-3

我要取出每个用户的最新一篇文章,用一个SQL怎么写出来?
即,取出的结果集应该是:

结果集:

userid           username         aid         title           addtime
---------------------------------------------------
1                     a                       2             标题2           2007-1-2
---------------------------------------------------
2                     b                       4             标题4           2007-1-3
---------------------------------------------------
3                     c                       null       null             null

------解决方案--------------------
create table 用户表(userid int,username varchar(20))
insert into 用户表
select 1, 'a '
union all select 2, 'b '
union all select 3, 'c '

create table 文章表(aid int,userid int,title varchar(1000),addtime datetime)
insert into 文章表
select 1,1, '标题1 ', '2007-1-1 '
union all select 2,1, '标题2 ', '2007-1-2 '
union all select 3,2, '标题3 ', '2007-1-1 '
union all select 4,2, '标题4 ', '2007-1-3 '
--查询
select 用户表.userid,用户表.username,文章表.*
from 用户表
left join (select aid,userid,title,addtime from 文章表 a where not exists(select 1 from 文章表 b where a.userid=b.userid and a.addtime <b.addtime))文章表 on 文章表.userid=用户表.userid
--结果
/*
userid username aid userid title
----------- -------------------- ----------- ----------- --------
1 a 2 1 标题2
2 b 4 2 标题4
3 c NULL NULL NULL
(所影响的行数为 3 行)
*/