title: Search all tables for a string and sort by number of occurrences of that string in a row (SQLite)
body: <p>Lets say there are 3 tables like this in my database.</p>
  <pre><code>table A         table B         table C
  id|title|body   id|name |desc   id|user |comment
  1 |xx   |xy     1 |zy   |yz     1 |zz   |yz
  2 |xyz  |yy     2 |xx   |xx     2 |xx   |xy
  3 |zy   |xx     3 |yy   |yy     3 |yyy  |yz
  </code></pre>
  <p>And when the search string is 'x' the result should be</p>
  <pre><code>|col1 |col2|
  |xx   |xx  | -- from table B, because 4 occurrences
  |xx   |xy  | -- from table A, because 3 occurrences
  |xx   |xy  | -- from table C, because 3 occurrences
  |zy   |xx  | -- from table A, because 2 occurrences
  |xyz  |yy  | -- from table A, because 1 occurrence
  </code></pre>
  <p>Which query should I run in SQLite to get such a result?</p>
  <p>EDIT: Changed column names in B and C to show they're not related.</p>