I have a table with three columns:
- patient_id
- obs_date
- weight_val
patient_id stores patient identification #, weight_val stores a weight value, and obs_date stores the date when the weight reading was taken. So, a patient can have many different weight readings at different dates.
How do you write a query for:
select all patients whose last weight reading is > 120?