Advertisement
Guest User

Untitled

a guest
Jan 21st, 2018
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.72 KB | None | 0 0
  1. INSERT INTO role (id, role_type) VALUES (1, 'ADMIN');
  2. INSERT INTO role (id, role_type) VALUES (2, 'CUSTOMER');
  3. INSERT INTO role (id, role_type) VALUES (3, 'TRAINER');
  4.  
  5. --you must give an initial valid rating value(1<=rating<=5); since nr_votes = 0, it will have no effect on further computations
  6. --same for courses
  7. INSERT INTO users(id, email, first_name,last_name, role_id, rating, nr_votes, password) VALUES (-1,'john@gmail.com','John', 'Smith', 2, 5, 0, 'john');
  8. INSERT INTO users(id, email, first_name,last_name, role_id, rating, nr_votes, password) VALUES (-2,'samantha@gmail.com', 'Samantha','Smith', 2, 5, 0, 'samantha');
  9. INSERT INTO users(id,first_name,last_name, role_id, rating, nr_votes) VALUES (-3,'Nancy', 'Smith', 2, 5, 0);
  10. INSERT INTO users(id,first_name,last_name, role_id, rating, nr_votes, description) VALUES (-4,'Cazoni', 'Robert', 3, 5, 0, 'I try to help clients achieve a balanced lifestyle that encompasses all dimensions of health & wellness.');
  11. INSERT INTO users(id,first_name,last_name, role_id, rating, nr_votes, description) VALUES (-5,'Valentin', 'Bara', 3, 4, 0, 'Growing up I spent my weekends playing soccer, joining all sport team I possibly could in school, and practiced every other sport my small town had to offer.');
  12. INSERT INTO users(id,first_name,last_name, role_id, rating, nr_votes) VALUES (-6,'Scarlet', 'Pop', 2, 5, 0);
  13. INSERT INTO users(id,first_name,last_name, role_id, rating, nr_votes) VALUES (-7,'Jacobine', 'Roslindis', 2, 5, 0);
  14. INSERT INTO users(id,first_name,last_name, role_id, rating, nr_votes) VALUES (-8,'Perlie', 'Mert', 2, 5, 0);
  15. INSERT INTO users(id,email,first_name,last_name, role_id, rating, nr_votes, password) VALUES (-10, 'cristi@gmail.com', 'Cristian', 'Butiri', 1, 5, 0, 'cristi');
  16. INSERT INTO users(id,first_name,last_name, role_id, register_date, rating, nr_votes) VALUES (-9,'Dong-Geun', 'Juurou', 2, to_timestamp('2017-10-19 10:23', 'YYYY-MM-DD HH:MI'), 5, 0);
  17.  
  18. INSERT INTO subscription(id,subscription_type,is_active,start_date, end_date, price,is_paid,user_id) VALUES (-1,'VIP',true, to_date('2018-09-01', 'YYYY-MM-DD'), to_date('2018-10-01', 'YYYY-MM-DD'), 200.00,false, -1);
  19. INSERT INTO subscription(id,subscription_type,is_active,start_date, end_date, price, is_paid,user_id) VALUES (-2,'STANDARD',true, to_date('2018-09-01', 'YYYY-MM-DD'), to_date('2018-10-01', 'YYYY-MM-DD'), 100.00,false, -1);
  20. INSERT INTO subscription(id,subscription_type,is_active,start_date, end_date, price,is_paid, user_id) VALUES (-3,'PREMIUM',true, to_date('2018-09-01', 'YYYY-MM-DD'), to_date('2018-10-01', 'YYYY-MM-DD'), 125.00, false,-2);
  21.  
  22. --you must give an initial valid rating value(1<=rating<=5); since nr_votes = 0, it will have no effect on further computations
  23. INSERT INTO course (id, course_name, difficulty_level, rating, nr_votes, description) VALUES (-1, 'Kangoo Jumps', 'EASY', 1, 0, 'Kangoo Jumps is a rebounding sports brand. It is one of several makes of jump shoes with springs.');
  24. INSERT INTO course (id, course_name, difficulty_level, rating, nr_votes, description) VALUES (-2, 'Crossfit', 'MEDIUM', 5, 0, 'CrossFit is a strength and conditioning program consisting mainly of a mix of aerobic exercise, calisthenics (body weight exercises), and Olympic weightlifting');
  25. INSERT INTO course (id, course_name, difficulty_level, rating, nr_votes, description) VALUES (-3, 'Pilates', 'ADVANCED', 5, 0, 'Pilates is a physical fitness system developed in the early 20th century by Joseph Pilates, after whom it was named.');
  26.  
  27. INSERT INTO course_session(id, date, course_id, trainer_id, maxnoparticipants, participants) VALUES(-1, to_timestamp('21-1-2018 11:30', 'DD-MM-YYYY HH24:MI'), -2, -4, 1, 1);
  28. INSERT INTO course_session(id, date, course_id, trainer_id, maxnoparticipants, participants) VALUES(-2, to_timestamp('22-1-2018 10:00', 'DD-MM-YYYY HH24:MI'), -1, -5, 15, 0);
  29. INSERT INTO course_session(id, date, course_id, trainer_id, maxnoparticipants, participants) VALUES(-3, to_timestamp('21-1-2018 10:00', 'DD-MM-YYYY HH24:MI'), -1, -4, 30, 0);
  30. INSERT INTO course_session(id, date, course_id, trainer_id, maxnoparticipants, participants) VALUES(-4, to_timestamp('23-1-2018 08:00', 'DD-MM-YYYY HH24:MI'), -3, -4, 30, 0);
  31. INSERT INTO course_session(id, date, course_id, trainer_id, maxnoparticipants, participants) VALUES(-5, to_timestamp('24-1-2018 17:30', 'DD-MM-YYYY HH24:MI'), -3, -4, 30, 0);
  32. INSERT INTO course_session(id, date, course_id, trainer_id, maxnoparticipants, participants) VALUES(-6, to_timestamp('24-1-2018 18:00', 'DD-MM-YYYY HH24:MI'), -2, -4, 30, 0);
  33. INSERT INTO course_session(id, date, course_id, trainer_id, maxnoparticipants, participants) VALUES(-7, to_timestamp('25-1-2018 19:15', 'DD-MM-YYYY HH24:MI'), -1, -4, 30, 0);
  34.  
  35. INSERT INTO course_session_user(course_session_id, user_id) VALUES (-1, -1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement