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表中刪除數據