WITHIN Interview Question

Design some SQL queries and model them in a Ruby on Rails system.