In my rails application used sql query like:
user.questions.joins(:answers, :customer_infos).where("answers.customers_info_id = customer_infos.id and answers.question_id = questions.id and age >= ? and age <= ?",from_age, to_age ).select("customer_infos.*").group("customer_infos.id,multiple_queue_id")
So how can I convert to sunspot solr query?