title: spark sql :- Find out the Id, Name, Salary of the people whose planned pension is more than 20% of the salary
body: <p>Using an SQL query, I am trying to extract the Id, Name, and Salary of the records which have planned pension more than 20% of the salary.</p>
  
  <p>Here is my SQL query:</p>
  
  <pre><code>sqlContext.sql("""select Id,Name,Salary from work where Pension &gt;= Salary/20*100 order by Id asc""").show()
  </code></pre>
  
  <p>And, here is the table which my SQL query is accessing:</p>
  
  <pre><code>[
      Row(Id=1, Name=u'Anu', Mail=u'Anu1@gmail.cpm', Age=23, Salary=15000, Pension=5000),
      Row(Id=6, Name=u'Teja', Mail=u'Teja6@gmail.com', Age=38, Salary=20000, Pension=2000),
      Row(Id=9, Name=u'Arun', Mail=u'Arun9@gmail.com', Age=27, Salary=50000, Pension=3000),
      Row(Id=5, Name=u'Ramu', Mail=u'Ramu5@gmail.com', Age=35, Salary=40000, Pension=3000),
      Row(Id=3, Name=u'Geetha', Mail=u'Geetha3@gmail.com', Age=31, Salary=24000, Pension=4000),
      Row(Id=2, Name=u'Archana', Mail=u'Archana2@gmail.com', Age=30, Salary=20000, Pension=2000),
      Row(Id=10, Name=u'Reka', Mail=u'Reka10@gmail.com', Age=30, Salary=20000, Pension=4000),
      Row(Id=4, Name=u'Ramesh', Mail=u'Ramesh4@gmail.com', Age=32, Salary=30000, Pension=3000),
      Row(Id=8, Name=u'Ezhil', Mail=u'Ezhil8@gmail.com', Age=28, Salary=40000, Pension=4000),
      Row(Id=7, Name=u'Murali', Mail=u'Murali7@gmail.com', Age=39, Salary=20000, Pension=1000)
  ]
  </code></pre>