title: How to use a list in where clause in spark-sql
body: <p>I have data of the following format :</p>
  
  <pre><code>df
  uid String event
  a   djsan  C
  a   fbja   V
  a   kakal  Conversion
  b   jshaj  V
  b   jjsop  C
  c   dqjka  V
  c   kjkk   Conversion
  </code></pre>
  
  <p>I need to extract all the rows of the user whose event is conversion, so the expected outcome should be :</p>
  
  <pre><code>uid String event
  a   djsan  C
  a   fbja   V
  a   kakal  Conversion
  c   dqjka  V
  c   kjkk   Conversion
  </code></pre>
  
  <p>I'm trying to use spark- sql for the same. I was trying to use a simple subquery of the form </p>
  
  <pre><code>Select * from df where uid in (Select uid from df where event = 'Conversion')
  </code></pre>
  
  <p>but this is giving me an exception.</p>
  
  <p>Also I wanted to see if I had a list object of the uid, can I use that in a SQL statement and if yes, how?</p>
  
  <pre><code>list : List[String] = List('a','c')
  </code></pre>