/* testing recommend when user, david, has had no likes yet*/

/*clear all*/
delete from likes;
delete from users;
drop table if exists movies cascade;
\i /usr0/stu415_s13/etaralova415/loading.sql

/*populate*/
insert into users (login_name,email,passwd) values ('anca', 'anca@cmu.edu', 'ancapass');
insert into users (login_name,email,passwd) values ('bob', 'bob@cmu.edu', 'bobpass');
insert into users (login_name,email,passwd) values ('charlie', 'charlie@cmu.edu', 'charliepass');
/*for this user:*/
insert into users (login_name,email,passwd) values ('david', 'david@cmu.edu', 'davidpass');

insert into likes (login_name,mtitle) values ('anca', 'Armageddon');
insert into likes (login_name,mtitle) values ('bob', 'Armageddon');
insert into likes (login_name,mtitle) values ('bob', 'TRON');
insert into likes (login_name,mtitle) values ('bob', 'Batman');
insert into likes (login_name,mtitle) values ('charlie', 'Armageddon');
insert into likes (login_name,mtitle) values ('charlie', 'TRON');
insert into likes (login_name,mtitle) values ('charlie', 'Bolt');
insert into likes (login_name,mtitle) values ('charlie', 'Casino');


/*cold start for david:*/
/*
select likes.mtitle, count(likes.mtitle) as popularity
from likes
group by likes.mtitle
order by popularity desc, likes.mtitle desc;
*/




