Creating SQL script queries. Need help creating script queries.
Make sure that you run "viewer" and "movie" before you run "rating", since "rating" has foreign keys referencing the other two tables
QUERIES:
1. Get the reviewers' ID and their occupations
2. Get the movie title for all movies that are comedy or horror, rename the output attribute name to be "Happily Scared"
3. Get the reviewer ID for male students or students older than 30.
4. What are the occupations that are NOT student, lawyer or educator? List them in descending alphabetical order
5. List all movies released in 1982 , sorted by alphabetical order
6. List all "mean" reviewers and their average rating scores - mean reviewers are reviewers whose average rating score is less than 2
7. List the oldest age of reviewers for each profession
8. List number of reviewers for each profession, not including students or educators
9. List the average student reviewers' age by gender
10. List all occupations in which the female reviewers have an average age above 40