Homework 2 Choose six recent popular movies. Ask at least five people that you know (friends, family, classmates, imaginary friends) to rate each of these movie that they have seen on a scale of 1 to 5.

getwd()
## [1] "C:/Users/Emahayz_Pro/Desktop/Data_Science/Data 607/Week2"
setwd("C:/Users/Emahayz_Pro/Desktop/Data_Science/Data 607/Week2")

#install.packages("RMariaDB")
library(RMariaDB)
Ratings <- dbConnect(RMariaDB::MariaDB(),
                        user="movieuser",
                        password="password",
                        dbname="movies",
                        host="localhost")

Take the results (observations) and store them in a SQL database. Load the information into an R dataframe. Create a Varaible (MyRating)to store my Query

MyRating <- "Select 
            MovieID, ReviewerName, Title, Rating
            From Movies
            INNER JOIN Reviewers USING (MovieID)
            GROUP By MovieID;"

Your deliverables should include your SQL scripts and your R Markdown code, posted to GitHub. Pull The Query

Result <- dbGetQuery(Ratings, MyRating)

Display the Results

Result
##   MovieID ReviewerName                                     Title Rating
## 1       1         Amos                               Devil Winds      3
## 2       2       Alfred         The Biggest of Oklahoma Tornadoes      5
## 3       3         Gina     Tornado Video Classics - Volume Three      2
## 4       4       Santos El Reno Oklahoma Tornado Full Storm Chase      3
## 5       5      McKezie       Tornado Video Classics - Volume Two      5
## 6       6         Gina                               Dirty Deeds      4

END