title: Spark SQL between statement
body: <p>How to find the salary within a range? Here is my Spark SQL dataframe code for finding the salary between 10000 and 20000:</p>
  
  <pre><code>empData.where($"Salary" &gt; 10000 &amp;&amp; $"Salary" &lt; 20000).orderBy($"Salary".desc).show()
  </code></pre>
  
  <p>I believe there should be an alternative solution using <code>between</code>. How can I use <code>between</code> approach?</p>