instruction: how many patients stayed in hospital for more than 10 days and tested in lab for ferritin?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "10" AND lab.label = "Ferritin"