instruction: tell me the average cost of a hospital visit that involved a urinary sodium lab test until 1 year ago?
response: SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'urinary sodium')) AND DATETIME(cost.chargetime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY cost.patienthealthsystemstayid) AS t1