practical questions l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Practical Questions PowerPoint Presentation
Download Presentation
Practical Questions

Loading in 2 Seconds...

play fullscreen
1 / 9

Practical Questions - PowerPoint PPT Presentation


  • 515 Views
  • Uploaded on

Practical Questions Movie (Title, Year, Length, inColor, StudioName, Producer) Give the SQL Statement that produced the outcome for the following query from the above mention Relation. Find all the movies that produced by Disney Studios in 1990.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Practical Questions' - jacob


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
practical questions

Practical Questions

Movie (Title, Year, Length, inColor, StudioName, Producer)

Give the SQL Statement that produced the outcome for the following query from the above mention Relation.

Find all the movies that produced by Disney Studios in 1990.

Modify the above query (Q1) to produce only the movie title and length

Modify the above query (Q2) to produce a relation with attributes Name and Duration in place of title and length.

Modify the above query(Q3) to produced length in hours

Find all movies made after 1970 that are in black and white

Find the titles of the movies made by MGM Studios that either were made after 1970 or were less than 90 minutes long.

Search for all movies with a possessive (‘s) in their titles

List the Disney movies of 1990 from the relation by length, shortest first and among movies of equal length alphabetically.

1 find all the movies that produced by disney studios in 1990
1. Find all the movies that produced by Disney Studios in 1990.

SELECT *

FROM Movie

WHERE StudioName = ‘Disney’ AND Year = 1990

slide3
2. Modify the above query (Q1) to produce only the movie title and length

SELECT Title, Length

FROM Movie

WHERE StudioName = ‘Disney’ AND Year = 1990;

slide4
3. Modify the above query (Q2) to produce a relation with attributes Name and Duration in place of title and length.

SELECT Title AS Name, Length AS Duration

FROM Movie

WHERE StudioName = ‘Disney’ AND Year = 1990;

slide5
4. Modify the above query(Q3) to produced length in hours

SELECT Title AS Name, Length/60 AS LengthInHours

FROM Movie

WHERE StudioName = ‘Disney’ AND Year = 1990;

slide6
5. Find all movies made after 1970 that are in black and white

SELECT Title

FROM Movie

WHERE Year > 1970 AND NOT inColor;

slide7
6. Find the titles of the movies made by MGM Studios that either were made after 1970 or were less than 90 minutes long.

SELECT Title

FROM Movie

WHERE (Year > 1990 OR Length <90) AND StudioName = ‘MGM’;

slide8
7. Search for all movies with a possessive (‘s) in their titles

SELECT Title

FROM Movie

WHERE Title LIKE ‘%’’s’;

slide9
List the Disney movies of 1990 from the relation by length, shortest first and among movies of equal length alphabetically.

SELECT *

FROM Movie

WHERE studioName = ‘Disney’ AND Year = 1990

ORDER BY Length, title;