where - SQL Difference between two delete queries -


I do not understand the difference between these two questions. First of all, this is a schema:

  Movie (MID, title, year, director) English: ID number is a movie with MID, a title, a release year, and a director reviewer ( RID, Names) English: A reviewer has a definite name with ID number RID. Rating (RID, MID, STAR, Rating Date) English: Reviewer RID gave the film MID a number of stars rating (1-5) on a fixed rating date. What is called:  
  Remove all ratings from 1970s or later 2000s, and ratings are below 4 stars.   

Two questions: Remove from rating MDID (Select M.M.D. from the movie M.Join rating RMM MID = RMID WHERE (Year & lt; 1970 or year & gt; 2000) and stars & lt; 4) in ratings from WHERE MID (Choose Movie Mate for the Year WHERE Year <1970 or Year> 2000) and stars & lt; 4

Now, the first query is not correct, while the second is the query, but I do not understand why

in the first query I have all those movies I am generating mid with a rating of 4 stars and their year before 1970 or 2000. And then looking at the rating for MID and delete the line (at least I think this is what it is doing)

In another query, I have all those rows Removing those tables where the stars are less than 4 and mid is a movie that dates back to 1970 or 2000 before 2000.

  Remove from rating where in the MID (selection) M.M.D. In the MID = RMID WHERE (year <1970 or the year> 2000) and stars & lt; 4)   

you are removing all the reviews, whose MIDs have 4 Or the rating of fewer stars is matched with the reviews of MID which means that you have 4 or 5 stars for movies released after 1970 or 2000 With rating, the review is also being removed, at least one review is the only test for the review with rating of less than four stars, and the rating is not the MID and the rating is not. Remove from the rating where in the MID (select the movie from the movie year <1970 or year> 2000) and stars & lt; 4

In this query, you are referring to both statuses (Movie Release Years and Ratings) to remove the review.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -