Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +-------+-----+-----+---------+
- |vocabId|docId|count| word|
- +-------+-----+-----+---------+
- | 1| 1| 1000| plane|
- | 1| 3| 100| plane|
- | 3| 1| 1200|motorbike|
- | 3| 2| 702|motorbike|
- | 3| 3| 600|motorbike|
- | 5| 3| 2000| boat|
- | 5| 2| 200| boat|
- +-------+-----+-----+---------+
- 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
- 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
- boat, motorbike, 2
- motorbike, plane, 2
- boat, plane, 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement