SELECT T1.city,
(select count(*) from T2 where T1.id=T2.id )
as totbooks ,
(select count(*) from T3 where T1.id=T3.id
and descr like '%newspaper%' )
as totnewspaper
FROM T1 group by T1.description |
SELECT T1.city,
(select count(*) from T2 where T1.id=T2.id )
as totbooks ,
(select count(*) from T3 where T1.id=T3.id
and descr like '%newspaper%' )
as totnewspaper
FROM T1 group by T1.description |
热词搜索:
上一篇:SQL查询一年中的所有星期五
下一篇:如何从SQL表中删除数据