分组选出第一的sql语句
rsstring_vote = "SELECT top 1 * from Candidate group by group " 这个语句不对么,根据group分组 然后选出每组第一的信息我改成这样还不对
SELECT max(ps),name,id,rq,college,t_group from Candidate Group by t_group
嵌套语句仍然不对
SELECT name,id,rq,college,t_group from Candidate where ps in (SELECT max(ps),t_group from Candidate Group by t_group)
[[it] 本帖最后由 lzxm160 于 2008-10-2 09:36 编辑 [/it]]