README

  1. All employees in Pune(or any other city). eg: “baner”

Employee.joins(:address).where("addresses.area=?", "baner")
  1. Search any employee via name and/or email should return the name email and his/her address

Employee.joins(:address).where("employees.name=?","bhushan").pluck(:name,:email,:area)
  1. List of employees earning between 10K to 50K

Employee.joins(:salary_designation).where("salary", 43000...50000).pluck(:name,:salary)
  1. salary greater than 50k

Employee.all.where("salary > ?", 50000).pluck(:name,:salary)