想咨询一下这样一个SQL 语句 有没有更精简的写法? select s.title,(select count(*) from gw_product_sort where pid=3 ) as b from gw_product_sort s where s.id=3这个语句是想 查询某个产品分类名称和其下的子分类个数如果想要查询多个产品分类名称和对应子分类个数的话,语句又该怎么写呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select s.title,b.number FROM gw_product_sort s,(select count(*) as number from gw_product_sort where pid=3) bwhere a.title=b.title select s.title,(select count(*) from gw_product_sort where pid=3 ) as b from gw_product_sort s where s.id in (1,3,4) select a.title,count(*) from gw_product_sort a inner join gw_product_sort b on a.id = b.pid where a.id in (?,?,?) group by a.id mysql-python出现Lost connection错误 请教!高手帮忙!在线等 大家帮忙看看我的这个事物有什么问题,导致无法进行更新? 请教如何删除主键自增的属性? mysql中如何根据sql语句执行结果执行其他sql语句 MySQL里面KEY关键字和foreign key区别? mysql 如何利用timestamp字段来按月份分区? 帮我写个sql语句。 **** 这样的嵌套排序的SQL语句应该怎样写?**** mysql5.6移动目录以后无法启动 mysql 有两列a和b 现在想让列a-列b作为列c , 再求列c 的和,可以用一条语句执行吗? 循环重复
FROM gw_product_sort s,(select count(*) as number from gw_product_sort where pid=3) b
where a.title=b.title