title: I have two table fileA and fleB i want records of similar words data and total row of fileA table
body: <p>I am working of to find the percentage of similarity in two files i manage to save the works in tables separately and saved them in two tables</p>
  
  <ol>
  <li>fileA</li>
  <li>fileB</li>
  </ol>
  
  <p>data in FILE-A table</p>
  
  <p><a href="https://i.stack.imgur.com/URbKi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/URbKi.png" alt="Data in fileA table"></a></p>
  
  <p>data in FILE-B table</p>
  
  <p><a href="https://i.stack.imgur.com/fXVdQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fXVdQ.png" alt="Datain fileB table"></a></p>
  
  <p>Now i want to write a sql query where i know the numbers of same words rows of both table and total number of rows in fileA table then i want to make a calculation
  like</p>
  
  <p>total number of row in file are 7
  same words rows of both tables are 4</p>
  
  <p>percentage of similarity = 4/7*100 = 57.14 and display it in browser</p>
  
  <p>i have used this query</p>
  
  <pre><code>SELECT fileprints.fileA, fileb.fileB FROM fileprints LEFT JOIN fileB ON fileprints.id=fileB.id WHERE fileprints.fileA=fileb.fileB;
  </code></pre>
  
  <p>it gives me</p>
  
  <p><a href="https://i.stack.imgur.com/cEx4M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cEx4M.png" alt="enter image description here"></a></p>
  
  <p><strong>I WANT PERCENTAGE OF SIMILAR WORDS IN BOTH TABLES</strong></p>
  
  <p>Any expert opinion, suggestions!</p>