@@ -68,8 +68,9 @@ OR manually execute the commands in the hive shell as shown below
6868
6969
7070
71- # EXPLORED QUESTIONS
72- ##### Top 10 viewed movies
71+ ## EXPLORED QUESTIONS
72+
73+ ### Top 10 viewed movies
7374```
7475SELECT movies.MovieID,movies.Title,COUNT(DISTINCT ratings.UserID) as views
7576FROM movies JOIN ratings ON (movies.MovieID = ratings.MovieID)
@@ -79,7 +80,9 @@ LIMIT 10;
7980```
8081
8182
82- #### Top 20 rated movies having at least 40 views
83+ </hr>
84+
85+ ### Top 20 rated movies having at least 40 views
8386```
8487SELECT movies.MovieID,movies.Title,AVG(ratings.Rating) as rtg,COUNT(DISTINCT ratings.UserID) as views
8588FROM movies JOIN ratings ON (movies.MovieID = ratings.MovieID)
@@ -89,9 +92,12 @@ ORDER BY rtg DESC
8992LIMIT 20;
9093</CODE >
9194```
95+
9296
9397
94- #### Create exploded view of movie id and genre
98+ </hr>
99+
100+ ### Create exploded view of movie id and genre
95101```
96102CREATE view movie_by_genre as SELECT movieid, genre FROM
97103(
@@ -101,7 +107,9 @@ CREATE view movie_by_genre as SELECT movieid, genre FROM
101107
102108
103109
104- #### Find top 3 genres for each user
110+ </hr>
111+
112+ ### Find top 3 genres for each user
105113```
106114CREATE TEMPORARY TABLE movie_by_user_genre as
107115SELECT t1.* , t2.rating,t2.userid
0 commit comments