title: contains function for String in presto Athena
body: <p>I have a table with <code>ORC</code> Serde in Athena. The table contains a string column named <code>greeting_message</code>. It can contain <strong>null</strong> values as well. I want to find how many rows in the table have a particular text as the pattern.</p>
  <p>Let's say my sample data looks like below:</p>
  <pre><code>|greeting_message |
  |-----------------|
  |hello world      |
  |What's up        |
  |                 |
  |hello Sam        |
  |                 |
  |hello Ram        |
  |good morning, hello |
  |                 |
  |the above row has null |
  | Good morning Sir |
  </code></pre>
  <p>Now for the above table, if we see there are a total of 10 rows. 7 of them are having not null values and 3 of them just has null/empty value.</p>
  <p><strong>I want to know what percentage of rows contain a specific word.</strong></p>
  <p>For example, consider the word <code>hello</code>. It is present in 4 rows, so the percentage of such rows is 4/10 which is 40 %.</p>
  <p>Another example: the word <code>morning</code> is present in 2 messages. So the percentage of such rows is 2/10 which is 20 %.</p>
  <p><strong>Note</strong> that I am considering <code>null</code> also in the count of the denominator.</p>