Skip to content

Instantly share code, notes, and snippets.

@rohitdholakia
Created December 24, 2011 19:47
Show Gist options
  • Save rohitdholakia/1518190 to your computer and use it in GitHub Desktop.
Save rohitdholakia/1518190 to your computer and use it in GitHub Desktop.
SQL Queries to create tables for Netflix
create table allRatings (
movieId int(20),
userId int(20),
rating int(20),
timestamp decimal(60,4));
create table userdata (
id int(30),
average decimal(50,5),
number int(20));
create table moviedata (
id int(30).
average decimal(50,5),
number int(20));
create index movie on allRatings(movieId);
create index user on allRatings(userId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment