Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. CREATE TABLE search_query {
  2. keyword VARCHAR (30),
  3. occurrences INT
  4. }
  5.  
  6. keyword occurrences
  7. HOW 0
  8. TO 0
  9. CODE 0
  10. THIS 0
  11.  
  12. CREATE TABLE product_keywords {
  13. productId INT,
  14. keyword VARCHAR(30)
  15. }
  16.  
  17. productId keyword
  18. 12 HOW
  19. 12 NOT
  20. 12 CODE
  21. 13 RANDOM
  22. 13 THIS
  23. 13 CODE
  24.  
  25. HOW 1
  26. TO 0
  27. CODE 2
  28. THIS 1
  29.  
  30. UPDATE destination_table
  31. SET destination_table.occurrences = JN.matches
  32. FROM search_query AS destination_table
  33. INNER JOIN [where I freeze] AS JN
  34. WHERE ....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement