Created SQL statement to fetch properties on search