Question: Please type the answer step by step so i can read it clearly and learn it . Thanks Install phpMyAdmin by following the steps at
Please type the answer step by step so i can read it clearly and learn it . Thanks

Install phpMyAdmin by following the steps at the video XAMPP-phpMyAdmin-MySQL-MarinaDB. Now run the following SQL statements to create two tables and to insert few entries CREATE TABLE `patient ( patientid" int(11) NOT NULL, name' varchar(100) DEFAULT NULL, dateOfBirth datetime NOT NULL, PRIMARY KEY(patientid) CREATE TABLE 'visit' ( visitid' int(11) NOT NULL, patientid' int(11) NOT NULL, 'visitDate' datetime NOT NULL, PRIMARY KEY(visitid), CONSTRAINT fk_has_patient FOREIGN KEY(patientid) REFERENCES patient (patientid) ); INSERT INTO patient VALUES (1, 'Sara Brown', '1981-01-01'), (2, 'John Smith', '1941-01-01'), (3, 'Jack Ma', '1961-01-30'); INSERT INTO visit VALUES (1, 1, '2002-01-01'), (2, 2, '2018-01-01') (3, 2, '2019-01-01'), (4, 2, '2828-81-81'); Now add one more patient to the table patient with name 'Ellen Hamid' with birth date of '2000-01-01 Now 1- Write a query to list, for every patient, their corresponding visits (note: for all patients, including the ones who never visited the clinic) The resulting table must have the following columns: Name, VisitDate 2- Write a query to list all patients who have visited the clinic more than once The resulting table must have the following columns: Name, no OfVisits 3- Write a query to list all patients who visited the clinic at least once before year 2019 The resulting table must have the following columns: Name, visitDate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
