SQL questions asked in top product based companies:
1. Imagine a table named “Movies” with columns: MovieID, Title, ReleaseDate, GenreID.
There’s another table “Genres” with columns: GenreID, GenreName.
Write a SQL query to fetch the genres that don’t have any movies associated with them.
There’s another table “Genres” with columns: GenreID, GenreName.
Write a SQL query to fetch the genres that don’t have any movies associated with them.
select genres_id from genres g left join movies m on g.generid = m.generid where m.moviesid is NULL.
Comments
Post a Comment