怎么写这条语句? 错了,错了,结果应该是userid name descript countvote1 chenyh aaaa 32 wang bbbb 13 li cccc 2 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select A.id userid, A.name, A.descript, count(B.*) countvote from tablea Aleft join tableb B on A.id = B.userid try:select id,name,descript,count(b.*) as countvote from tablea a,tableb bwhere a.id=b.useridgroup by id,name,descript select * from a aa left join (select userid,count(*) countvote from b group by userid)bbon aa.id=bb.userid select a.userid,a.name,a.descript,count(b.userid) as countvotefrom table a inner join table b on a.userid=b.userid select id,name,descript,count(b.userid) as countvote from table a,table bwhere a.id=b.useridgroup by id,name,descript select userid,name,descript,max(voteid) as vountvodefrom a,b where a.id=b.userid select userid, name, descript, count(B.*) as countvote from tablea Aleft join tableb B on A.id = B.useridgroup by userid,name,descript 50分,超简单sql语句! 批量插入数据求SQL语句 求一个sql语句的问题!!!!!! 求比较两个标数据是否变化的高效率语句 读取文本文件!!!请教邹捷大侠!!!! sqlserver2000可以在存储过程里发送邮件吗? 一个SQL语句的问题!在线等!!!!!,请大家帮忙! 请问库存盘点是怎么一回事,那位高手可以跟我讲讲,多谢谢!! JDBC! JDBC!! SYBASE???... 如何使两个服务器数据同步?(我采用的是sybase数据库) 如何写脚本,将一台服务器的数据导到另一台服务器上? 请教关于文本加载
from tablea A
left join tableb B on A.id = B.userid
select id,name,descript,count(b.*) as countvote from tablea a,tableb b
where a.id=b.userid
group by id,name,descript
(select userid,count(*) countvote from b group by userid)bb
on aa.id=bb.userid
from table a inner join table b on a.userid=b.userid
where a.id=b.userid
group by id,name,descript
from a,b where a.id=b.userid
from tablea A
left join tableb B on A.id = B.userid
group by userid,name,descript