human
Schema:
Student (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)
Dorm (dormid, dorm_name, student_capacity, gender)
Dorm_amenity (amenid, amenity_name)
Has_amenity (dormid, amenid)
Lives_in (stuid, dormid, room_number)
Please answer with SQL.
assistant
Sure, I understand.
human
show the codes of all different cities where students are living.
assistant
SELECT distinct city_code FROM student;
human
find the number of students who are not living in the city with code HKG.
assistant
SELECT COUNT( * ) FROM student WHERE city_code != 'HKG';
human
what are their first and last names?
assistant
SELECT fname , lname FROM student WHERE city_code != "HKG" ;