Knowee
Questions
Features
Study Tools

X city opened a new cinema, many people would like to go to this cinema. Thecinema also gives out a poster indicating the movies’ ratings and descriptions.Please write a SQL query to output movies with an odd numbered ID and adescription that is not 'boring'. Order the result by rating.For example, table cinema:idmoviedescriptionrating1Wargreat 3D8.92Sciencefiction8.53Irishboring6.24Ice SongFantasy8.65House cardInteresting9.1For the example above, the output should be:idmoviedescriptionrating5House cardInteresting9.11Wargreat 3D8.9Optionsselect id, movie, descriptionfrom moviewhere rating % 2 = 1 and description <> 'boring'order by rating;select id, movie, description, ratingfrom cinemawhere id % 2 = 1 and description <> 'boring'order by rating desc;select id, movie, description, ratingfrom ratingwhere id % 2 = 1 and description <> 'boring'order by cinema desc;select movie, description, ratingfrom cinemawhere id % 2 != 1 and description <> 'boring'order by rating asc;

Question

X city opened a new cinema, many people would like to go to this cinema. Thecinema also gives out a poster indicating the movies’ ratings and descriptions.Please write a SQL query to output movies with an odd numbered ID and adescription that is not 'boring'. Order the result by rating.For example, table cinema:idmoviedescriptionrating1Wargreat 3D8.92Sciencefiction8.53Irishboring6.24Ice SongFantasy8.65House cardInteresting9.1For the example above, the output should be:idmoviedescriptionrating5House cardInteresting9.11Wargreat 3D8.9Optionsselect id, movie, descriptionfrom moviewhere rating % 2 = 1 and description <> 'boring'order by rating;select id, movie, description, ratingfrom cinemawhere id % 2 = 1 and description <> 'boring'order by rating desc;select id, movie, description, ratingfrom ratingwhere id % 2 = 1 and description <> 'boring'order by cinema desc;select movie, description, ratingfrom cinemawhere id % 2 != 1 and description <> 'boring'order by rating asc;

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

The correct SQL query from the options given would be:

SELECT id, movie, description, rating
FROM cinema
WHERE id % 2 = 1 AND description <> 'boring'
ORDER BY rating DESC;

This query will select the columns id, movie, description, and rating from the cinema table where the id is an odd number and the description is not 'boring'. The results will be ordered by rating in descending order.

This problem has been solved

Similar Questions

List titles of films with 10 or more actors playing the act. Sort the output on descending order of actors per film.will the below query will provide you the correct result SELECT  title as Film_Name, count(actor_id) as Total_ActorsFROM filmINNER JOINfilm_actorONfilm.film_id=film_actor.film_idGroup by  film.film_idhaving  Total_Actors > 9ORDER BYTotal_Actors DESC, titlea.Trueb.False

Write SQL query considering below schema of databaseFilm(film_id, title, legth, rental_rate), Actor(film_id, actor_id, first_name, last_name)Category(film_id, rating, language, release_year)Create tables with Primary Key, foreign key constraints in given schemas.i.Give the name of actors whose actor id is 23.ii.Give the title of films whose id is between 25 and 40.iii.Give the name of actor whose last name contains Kapoor.iv.Give the title of film which was released in 2022.v.Give the name of actors played who have role in film title ‘Chhello divas’

SELECT * from movies WHERE imdb_rating > 7.95 + (select stddev(imdb_rating) from movies) OR imdb_rating < 7.95 - (select stddev(imdb_rating) from movies)

You are managing a database for a movie production company. The database includes information about actors, directors, movies, movie cast, and ratings.Write a query for updating the ratings of all movies directed by 'Lankesh' to a new rating of 3 in a database that contains information about actors, directors, movies, movie casts, and ratings.The following table is already created, and the records are inserted into the table.

Consider the following database:MOVIE(id,title,yr)ACTOR(id,name)CASTING(movieid,actorid)Identify the SQL command which will return the titles of all 1959 Marilyn Monroe films.Option 1. The following SQL...SELECT title FROM movie,casting,actor WHERE movieid = movie.id<> AND name = 'Marilyn Monroe' ; Option 2. The following SQL...SELECT title FROM movie,actor WHERE name = 'Marilyn Monroe' AND yr = 1959 ; Option 3. The following SQL...SELECT title FROM movie,casting,actor WHERE movieid = movie.id AND actor.id = actorid AND name = 'Marilyn Monroe' AND yr = 1959 ; Option 4. The following SQL...SELECT title FROM movie,casting,actor WHERE movieid = movie.id AND actor.id = actorid AND movie.yr = casting.yr AND name = 'Marilyn Monroe' AND yr = 1959 ; Question 5Select one:a.Option 1b.Option 2c.Option 3d.Option 4

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.