Skip to content

Commit 6e55940

Browse files
authored
Update README.md
1 parent fa68154 commit 6e55940

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ OR manually execute the commands in the hive shell as shown below
6868
6969
![image](https://user-images.githubusercontent.com/69738890/95404381-7bedb200-08da-11eb-8aee-cb0f2d432d13.png)
7070
71-
# EXPLORED QUESTIONS
72-
##### Top 10 viewed movies
71+
## EXPLORED QUESTIONS
72+
73+
### Top 10 viewed movies
7374
```
7475
SELECT movies.MovieID,movies.Title,COUNT(DISTINCT ratings.UserID) as views
7576
FROM movies JOIN ratings ON (movies.MovieID = ratings.MovieID)
@@ -79,7 +80,9 @@ LIMIT 10;
7980
```
8081
![image](https://user-images.githubusercontent.com/69738890/95404826-bb68ce00-08db-11eb-94c1-bbf7bca70d1c.png)
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
```
8487
SELECT movies.MovieID,movies.Title,AVG(ratings.Rating) as rtg,COUNT(DISTINCT ratings.UserID) as views
8588
FROM movies JOIN ratings ON (movies.MovieID = ratings.MovieID)
@@ -89,9 +92,12 @@ ORDER BY rtg DESC
8992
LIMIT 20;
9093
</CODE>
9194
```
95+
9296
![image](https://user-images.githubusercontent.com/69738890/95405157-a3457e80-08dc-11eb-8b6b-b07bdaba0533.png)
9397
94-
#### Create exploded view of movie id and genre
98+
</hr>
99+
100+
### Create exploded view of movie id and genre
95101
```
96102
CREATE 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
![image](https://user-images.githubusercontent.com/69738890/95405324-18b14f00-08dd-11eb-971d-3ac31f693342.png)
103109
104-
#### Find top 3 genres for each user
110+
</hr>
111+
112+
### Find top 3 genres for each user
105113
```
106114
CREATE TEMPORARY TABLE movie_by_user_genre as
107115
SELECT t1.*, t2.rating,t2.userid

0 commit comments

Comments
 (0)