instruction: indicate the daily average amount of heartrate for patient 008-47798 until 03/27/2103.
response: SELECT AVG(vitalperiodic.heartrate) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '008-47798')) AND NOT vitalperiodic.heartrate IS NULL AND STRFTIME('%y-%m-%d', vitalperiodic.observationtime) <= '2103-03-27' GROUP BY STRFTIME('%y-%m-%d', vitalperiodic.observationtime)