Context: I am working with mortgage information scraped from another page, so the data I am working with is potentially inconsistent.
The potentially-relevant columns: created_at, updated_at, type, mortgage_duration, (either 15 or 30 years).
Given a specific type that I am looking for, I need to find the most recent mortgage information for a mortgage_duration of 15 and a mortgage_duration of 30. I only need one of each, because that's all we're displaying.
The result would potentially look like:
+-----------+-----+--------+-------+---------------------+----------+
| rate_type | m_d | info1 | info2 | created/updated_at | info3 |
+-----------+-----+--------+-------+---------------------+----------+
| type1 | 15 | 12345 | 11111 | 2017-09-20 21:44:49 | 09876 |
| type1 | 30 | 23456 | 22222 | 2017-09-20 21:44:49 | 12121 |
+-----------+-----+--------+-------+---------------------+----------+
The created/updated_at don't need to be the same between the 15- and 30-year, but they will much of the time.