SHARE
TWEET

Untitled

a guest Aug 17th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select * from reviews_by_rating WHERE reviewoverallrating=3 AND restaurantid=2;
  2. ----------------------------------------------------------------
  3.  reviewoverallrating  | 3
  4.  restaurantid         | 2
  5.  reviewdate           | 2019-08-01
  6.  reviewid             | f930d8a0-152e-4fed-920e-ef5e8face5e3
  7.  reviewambiencerating | 5
  8.  reviewbody           | I LOVE THIS PLACE!
  9.  reviewfoodrating     | 5
  10.  reviewhelpfulcount   | 15
  11.  reviewnoise          | 4
  12.  reviewrecommend      | True
  13.  reviewservicerating  | 5
  14.  reviewvaluerating    | 1
  15.  userlocation         | san francisco
  16.  username             | JOEBERTHOUD
  17.  usertotalreviews     | 5
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  select * from restaurant_reviews WHERE restaurantid = 2;
  26.  
  27. @ Row 1
  28. ----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  29.  restaurantid         | 2
  30.  reviewdate           | 2019-07-29
  31.  username             | SavannaWatsica
  32.  reviewid             | fba531b6-1484-46d4-bd4b-f3c8fd0e149c
  33.  reviewambiencerating | 3
  34.  reviewbody           | Quo molestiae ea dolorem nobis aperiam id incidunt voluptas dolorem. Eos recusandae maxime consectetur ipsa qui reiciendis odio. Non fugiat repellat totam non non. Voluptate quos assumenda sapiente laudantium architecto.
  35.  reviewfoodrating     | 5
  36.  reviewhelpfulcount   | 11
  37.  reviewnoise          | 1
  38.  reviewoverallrating  | 3
  39.  reviewrecommend      | True
  40.  reviewservicerating  | 1
  41.  reviewvaluerating    | 1
  42.  userlocation         | HELLLL
  43.  usertotalreviews     | 11
  44.  
  45. @ Row 2
  46. ----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  47.  restaurantid         | 2
  48.  reviewdate           | 2019-08-01
  49.  username             | JOEBERTHOUD
  50.  reviewid             | f930d8a0-152e-4fed-920e-ef5e8face5e3
  51.  reviewambiencerating | 5
  52.  reviewbody           | I LOVE THIS PLACE!
  53.  reviewfoodrating     | 5
  54.  reviewhelpfulcount   | 15
  55.  reviewnoise          | 4
  56.  reviewoverallrating  | 3
  57.  reviewrecommend      | True
  58.  reviewservicerating  | 5
  59.  reviewvaluerating    | 1
  60.  userlocation         | san francisco
  61.  usertotalreviews     | 5
  62.  
  63.  
  64.  
  65.  UPDATE reviews_by_rating SET userlocation='SAN CODELAND' WHERE reviewoverallrating=3 AND restaurantid=2 AND reviewdate='2019-08-01' AND reviewid=f930d8a0-152e-4fed-920e-ef5e8face5e3;
  66.  
  67.  ----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  68.  reviewoverallrating  | 3
  69.  restaurantid         | 2
  70.  reviewdate           | 2019-08-01
  71.  reviewid             | f930d8a0-152e-4fed-920e-ef5e8face5e3
  72.  reviewambiencerating | 5
  73.  reviewbody           | I LOVE THIS PLACE!
  74.  reviewfoodrating     | 5
  75.  reviewhelpfulcount   | 15
  76.  reviewnoise          | 4
  77.  reviewrecommend      | True
  78.  reviewservicerating  | 5
  79.  reviewvaluerating    | 1
  80.  userlocation         | SAN CODELAND
  81.  username             | JOEBERTHOUD
  82.  usertotalreviews     | 5
  83.  
  84.  
  85.  
  86.  INSERT INTO restaurant_reviews (
  87.                    ...     restaurantid,reviewdate,username,reviewambiencerating,reviewbody,reviewfoodrating,reviewhelpfulcount,reviewid,reviewnoise,reviewoverallrating,reviewrecommend,reviewservicerating,reviewvaluerating,userlocation,usertotalreviews) VALUES (3,'2019-07-28','julioFuentes',5,'place is good',4,20,8af8d970-990b-4866-9b88-6dafa8d4e204,3,3,False,4,3,'san jose',20);
  88.  
  89.  
  90.  ----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  91.  restaurantid         | 3
  92.  reviewdate           | 2019-07-28
  93.  username             | julioFuentes
  94.  reviewid             | 8af8d970-990b-4866-9b88-6dafa8d4e204
  95.  reviewambiencerating | 5
  96.  reviewbody           | place is good
  97.  reviewfoodrating     | 4
  98.  reviewhelpfulcount   | 20
  99.  reviewnoise          | 3
  100.  reviewoverallrating  | 3
  101.  reviewrecommend      | False
  102.  reviewservicerating  | 4
  103.  reviewvaluerating    | 3
  104.  userlocation         | san jose
  105.  usertotalreviews     | 20
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top