Knowee
Questions
Features
Study Tools

Insert a new field called ‘Movie’ to display the results of concatenating the ‘Title’ and‘Director’ fields. Add a ‘: Directed by ’ text string in the middle of concatenate formulaas well

Question

Insert a new field called ‘Movie’ to display the results of concatenating the ‘Title’ and‘Director’ fields. Add a ‘: Directed by ’ text string in the middle of concatenate formulaas well

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

Solution

It seems like you're trying to add a new field in a database or a spreadsheet that combines the 'Title' and 'Director' fields. Here's how you can do it in SQL and Excel:

  1. SQL:

Similar Questions

Given a database for a movie production company. The database includes information about actors, directors, movies, movie cast, and ratings. Write a query to retrieve the titles of all movies directed by 'Martin Scorsese' from the Movie Database.Your task is to identify and display the movies associated with the director with the name 'Martin Scorsese.'The following table is already created, and the records are inserted into the table.Table Details:

Define a class named Movie. Include private fields for the title, year, and name of the director.Include three public functions with the prototypesvoid Movie::setTitle(string);,void Movie::setYear(int);, andvoid setDirector(string);.Include another function that displays all the information about a Movie.Write a main()function that declares a movie object named myFavoriteMovie.Input:Inception2010Christopher NolanOutput:Title: InceptionYear: 2010Director: Christopher NolanInput

5.15 LAB: Movie show time displayWrite a program that reads movie data from a CSV (comma separated values) file and output the data in a formatted table. The program first reads the name of the CSV file from the user. The program then reads the CSV file and outputs the contents according to the following requirements:Each row contains the title, rating, and all showtimes of a unique movie.A space is placed before and after each vertical separator ('|') in each row.Column 1 displays the movie titles and is left justified with a minimum of 44 characters.If the movie title has more than 44 characters, output the first 44 characters only.Column 2 displays the movie ratings and is right justified with a minimum of 5 characters.Column 3 displays all the showtimes of the same movie, separated by a space.Each row of the CSV file contains the showtime, title, and rating of a movie. Assume data of the same movie are grouped in consecutive rows.Hints: Use the find() function to find the index of a comma in each row of the text file. Use the substr() function to extract texts separated by the commas.Ex: If the input of the program is:movies.csvand the contents of movies.csv are:16:40,Wonders of the World,G20:00,Wonders of the World,G19:00,Journey to Space ,PG-1312:45,Buffalo Bill And The Indians or Sitting Bull's History Lesson,PG15:00,Buffalo Bill And The Indians or Sitting Bull's History Lesson,PG19:30,Buffalo Bill And The Indians or Sitting Bull's History Lesson,PG10:00,Adventures of Lewis and Clark,PG-1314:30,Adventures of Lewis and Clark,PG-1319:00,Halloween,Rthe output of the program is:Wonders of the World | G | 16:40 20:00Journey to Space | PG-13 | 19:00Buffalo Bill And The Indians or Sitting Bull | PG | 12:45 15:00 19:30Adventures of Lewis and Clark | PG-13 | 10:00 14:30Halloween | R | 19:00

5.15 LAB: Movie show time displayWrite a program that reads movie data from a CSV (comma separated values) file and output the data in a formatted table. The program first reads the name of the CSV file from the user. The program then reads the CSV file and outputs the contents according to the following requirements:Each row contains the title, rating, and all showtimes of a unique movie.A space is placed before and after each vertical separator ('|') in each row.Column 1 displays the movie titles and is left justified with a minimum of 44 characters.If the movie title has more than 44 characters, output the first 44 characters only.Column 2 displays the movie ratings and is right justified with a minimum of 5 characters.Column 3 displays all the showtimes of the same movie, separated by a space.Each row of the CSV file contains the showtime, title, and rating of a movie. Assume data of the same movie are grouped in consecutive rows.Hints: Use the find() function to find the index of a comma in each row of the text file. Use the substr() function to extract texts separated by the commas.Ex: If the input of the program is:

Not Boring MoviesX 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 movie, description, ratingfrom cinemawhere id % 2 != 1 and description <> 'boring'order by rating asc;select 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;

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.