Trying to use query to get max dosage