SHARE
TWEET

Untitled

a guest Jun 16th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. +-------+-----+-----+---------+
  2. |vocabId|docId|count|     word|
  3. +-------+-----+-----+---------+
  4. |      1|    1| 1000|    plane|
  5. |      1|    3|  100|    plane|
  6. |      3|    1| 1200|motorbike|
  7. |      3|    2|  702|motorbike|
  8. |      3|    3|  600|motorbike|
  9. |      5|    3| 2000|     boat|
  10. |      5|    2|  200|     boat|
  11. +-------+-----+-----+---------+
  12.      
  13. select r1.word,r2.word, count(*) from result_T r1 JOIN result_T r2 ON r1.docId = r2.docId and r1.word = r2.word group by r1.word, r2.word
  14.      
  15. select r1.word,r2.word, count(*) from result_T r1 JOIN result_T r2 ON r1.docId = r2.docId and r1.word = r2.word group by r1.word, r2.word
  16.      
  17. boat, motorbike, 2
  18. motorbike, plane, 2
  19. boat, plane, 1
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top