CREATE TABLE department (departmentid NUMBER, name CLOB, head NUMBER)
CREATE TABLE block (blockfloor NUMBER, blockcode NUMBER)
CREATE TABLE nurse (employeeid NUMBER, name CLOB, position CLOB, registered BOOLEAN, ssn NUMBER)
CREATE TABLE procedures (code NUMBER, name CLOB, cost NUMBER)
CREATE TABLE on_call (nurse NUMBER, blockfloor NUMBER, blockcode NUMBER, oncallstart TIME, oncallend TIME)
CREATE TABLE medication (code NUMBER, name CLOB, brand CLOB, description CLOB)
CREATE TABLE affiliated_with (physician NUMBER, department NUMBER, primaryaffiliation BOOLEAN)
CREATE TABLE patient (ssn NUMBER, name CLOB, address CLOB, phone CLOB, insuranceid NUMBER, pcp NUMBER)
CREATE TABLE room (roomnumber NUMBER, roomtype CLOB, blockfloor NUMBER, blockcode NUMBER, unavailable BOOLEAN)
CREATE TABLE undergoes (patient NUMBER, procedures NUMBER, stay NUMBER, dateundergoes TIME, physician NUMBER, assistingnurse NUMBER)
CREATE TABLE physician (employeeid NUMBER, name CLOB, position CLOB, ssn NUMBER)
CREATE TABLE trained_in (physician NUMBER, treatment NUMBER, certificationdate TIME, certificationexpires TIME)
CREATE TABLE prescribes (physician NUMBER, patient NUMBER, medication NUMBER, date TIME, appointment NUMBER, dose CLOB)
CREATE TABLE appointment (appointmentid NUMBER, patient NUMBER, prepnurse NUMBER, physician NUMBER, start TIME, end TIME, examinationroom CLOB)
CREATE TABLE stay (stayid NUMBER, patient NUMBER, room NUMBER, staystart TIME, stayend TIME)

How many patients do each physician take care of? List their names and number of patients they take care of.
SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.pcp GROUP BY T1.employeeid
SELECT "T1"."name", COUNT(*) FROM "physician" "T1" JOIN "patient" "T2" ON "T1"."employeeid" = "T2"."pcp" GROUP BY "T1"."employeeid"