Ich möchte die Namen von Schauspielern finden, die eine maximale Anzahl von Filmen mit der Tabelle DERIVED durchgeführt haben. Wie kommt es zu diesem Fehler?Warum dieser Fehler angezeigt wird 'Fehlercode: 1146. Tabelle' sakila.t 'existiert nicht'?
meiner Anfrage
select actor from
(
select distinct(actor.first_name) as 'actor',count(film.film_id) as 'film_count' from actor
join film_actor on film_actor.actor_id=actor.actor_id
join film on film.film_id=film_actor.film_id
group by actor
order by film_count
) as t
where film_count=(select max(film_count) from t);
fügen Sie Ihre Abfrage als Text –
wählen Schauspieler aus ( \t select distinct (actor.first_name) als ‚Schauspieler zu bekommen ‘, count (film.film_id) als 'film_count' von Schauspieler \t film_actor auf film_actor.actor_id actor.actor_id = \t verbindet Film auf film.film_id film_actor.film_id = \t Gruppe von Schauspielern \t Sortieren nach film_count ) beizutreten als t wo film_count = (wählen Sie max (film_count) von t); –