added samples for sorting in sql and ruby