【Stern-Sternliste】
ID-Name
Es gibt N Sterne, selbstinkrementierende ID
【Singliedliste】
ID-Name Star_ID
N mehrere Songs
【Filmliste】
ID-Name Star_ID
N mehrere Filme
Fragen Sie ab, wie viele Lieder und Filme jeder Stern insgesamt hat
Name cout_sing count_movie
select conut(tb1.id) as singnum
from star as tb3
left join sing as tb1 on tb1.starid=tb3.id
where tb3.id=somenoe
select a.name,count(b.id) as singnum,count(c.id) as movienum
from star as a
left join sing as b on a.id=b.star_id left join movie as c on c.star_id=a.id group by b.id,c.id.