Write SQL query to solve given problem: Identify by their id all the devices that are used by women who are in the age range of 29 to 31 years.. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT device_id FROM gender_age_train WHERE age BETWEEN 29 AND 31 AND gender = 'F'