instruction: what is the number of patients whose hospital stay is above 6 days and with lab test category chemistry?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "6" AND lab."CATEGORY" = "Chemistry"