title: How can I have both receptionist name and doctors name in the same Query output?
body: <p>Generate a list of all appointments in alphabetical order by patient name and by latest date and time for each patient. The list should also include the doctor scheduled and the receptionist who made the appointment.</p>
  <p>This is my query so far:</p>
  <pre><code>SELECT PatientLastName, PatientFirstName, Date_Time AS 'AppointmentTime', ReasonForAppointment, 
  EmployeeLastName AS 'DoctorLastName', EmployeeFirstName AS 'DoctorFirstName', D.Speciality, 
  EmployeeLastName AS 'ReceptionistLastName', EmployeeFirstName AS 'ReceptionistFirstName'
  
  FROM Employee_T E JOIN Doctor_T D ON E.EmployeeID = D.Doctor_ID 
  JOIN Appointment_T A ON D.Doctor_ID = A.Doctor_ID JOIN Patient_T P ON A.Patient_ID = P.Patient_ID
  
  ORDER BY Date_Time DESC;
  </code></pre>
  <p>Here are my create table statements:</p>
  <pre><code>CREATE TABLE Employee_T
              (EmployeeID          DECIMAL(11,0)  NOT NULL,
               EmployeeFirstName    VARCHAR(25),     
               EmployeeLastName    VARCHAR(25),     
               EmployeeStreet      VARCHAR(30),     
               EmployeeCity        VARCHAR(20),     
               EmployeeState       CHAR(2),        
               EmployeeZipCode     VARCHAR(16),     
               EmployeeHireDate    DATE,            
               EmployeeEmail       VARCHAR(25),    
               EmployeePhone       VARCHAR(14),    
               EmployeeType        VARCHAR(1),     
  CONSTRAINT Employee_PK PRIMARY KEY (EmployeeID)); 
  
  CREATE TABLE Doctor_T
              (Doctor_ID        DECIMAL(11,0)  NOT NULL,
               Speciality        VARCHAR(30),    
               Degree            VARCHAR(40),   
               College           VARCHAR(50),   
               CertificationDate  Date,    
  CONSTRAINT  Doctor_PK PRIMARY KEY (Doctor_ID),
  CONSTRAINT  Docter_FK1 FOREIGN KEY (Doctor_ID) REFERENCES Employee_T(EmployeeID));
  
  CREATE TABLE Nurse_T
              (Nurse_ID         DECIMAL(11,0)  NOT NULL,
               Speciality        VARCHAR(30),   
               Degree            VARCHAR(30),   
               College           VARCHAR(40),    
               CertificationDate Date,    
  CONSTRAINT  Nurse_PK PRIMARY KEY (Nurse_ID),
  CONSTRAINT  Nurse_FK1 FOREIGN KEY (Nurse_ID) REFERENCES Employee_T(EmployeeID));
  
  
  CREATE TABLE Receptionist_T
              (Receptionist_ID          DECIMAL(11,0)  NOT NULL,
               Languages                VARCHAR(30),    
               YearsOfExperience        VARCHAR(30),    
               Assigned_Doctor_ID       DECIMAL(11,0)  NOT NULL, 
  CONSTRAINT  Receptionist_PK PRIMARY KEY (Receptionist_ID),
  CONSTRAINT  Receptionist_FK1 FOREIGN KEY (Receptionist_ID) REFERENCES Employee_T(EmployeeID),
  CONSTRAINT  Receptionist_FK2 FOREIGN KEY (Assigned_Doctor_ID) REFERENCES Doctor_T (Doctor_ID));
  
  
  
  CREATE TABLE Patient_T
              (Patient_ID          DECIMAL(11,0)  NOT NULL,
               PatientFirstName    VARCHAR(25),     
               PatientLastName     VARCHAR(25),     
               PatientStreet      VARCHAR(30),     
               PatientCity         VARCHAR(20),     
               PatientState        CHAR(2),         
               PatientZipCode      VARCHAR(16),     
               PatientEmail        VARCHAR(25),     
               PatientPhone        VARCHAR(14),     
  CONSTRAINT Patient_PK PRIMARY KEY (Patient_ID));
  
  CREATE TABLE Appointment_T
              (Appointment_ID           DECIMAL(11,0)  NOT NULL,
               Date_Time                DATETIME,        
               Cost                     VARCHAR(30),     
               ReasonForAppointment     VARCHAR(30),     
               Patient_ID               DECIMAL(11,0)  NOT NULL, 
               Receptionist_ID          DECIMAL(11,0)  NOT NULL,   
               Doctor_ID                DECIMAL(11,0)  NOT NULL,  
  CONSTRAINT  Appointment_PK PRIMARY KEY (Appointment_ID),
  CONSTRAINT  Appointment_FK1 FOREIGN KEY (Patient_ID) REFERENCES Patient_T(Patient_ID),
  CONSTRAINT  Appointment_FK2 FOREIGN KEY (Receptionist_ID) REFERENCES Receptionist_T(Receptionist_ID),
  CONSTRAINT  Appointment_FK3 FOREIGN KEY (Doctor_ID) REFERENCES Doctor_T (Doctor_ID));
  
  
  
  CREATE TABLE Treatment_T
              (Treatment_ID             DECIMAL(11,0)  NOT NULL,
               Date_Time                DATETIME,         
               TreatmentDescription     VARCHAR(100),     
               Patient_ID               DECIMAL(11,0)  NOT NULL,   
               Nurse_ID                 DECIMAL(11,0)  NOT NULL,  
               Doctor_ID                DECIMAL(11,0)  NOT NULL,   
  CONSTRAINT  Treatment_PK PRIMARY KEY (Treatment_ID),
  CONSTRAINT  Treatment_FK1 FOREIGN KEY (Patient_ID) REFERENCES Patient_T (Patient_ID),
  CONSTRAINT  Treatment_FK2 FOREIGN KEY (Nurse_ID) REFERENCES Nurse_T(Nurse_ID),
  CONSTRAINT  Treatment_FK3 FOREIGN KEY (Doctor_ID) REFERENCES Doctor_T(Doctor_ID));
  
  
  -- Create tables above the line - load tables below this line - DON't MIX
  
  
  INSERT INTO Employee_T  (EmployeeID, EmployeeFirstName, EmployeeLastName, EmployeeStreet, EmployeeCity, EmployeeState, EmployeeZipCode, EmployeeHireDate, EmployeeEmail, EmployeePhone, EmployeeType)
  VALUES  
  (1, 'Nicole', 'Blundell', '38 San Pablo St.', 'HydePark', 'MA', '02136', '2000-01-18', 'gfody@yahoo.com', '501-971-6249', 'D'),
  (2, 'Aaminah', 'Greaves', '682 Homestead Avenue', 'Waterloo', 'IA', '50701', '1999-02-20', 'noahb@yahoo.com', '374-695-6935', 'D'),
  (3, 'Donnie', 'Mitchell', '20 Winding Way Ave.', 'Philadelphia', 'PA', '19111', '2003-04-20', 'tubesteak@sbcglobal.net', '702-492-7923', 'D'),
  (4, 'Maximilian', 'Knox', '8541 Lincoln St.', 'North Canton', 'OH', '44720', '2007-03-08', 'cremonini@msn.com', '532-913-3370', 'N'),
  (5, 'Mayur', 'Howarth', '890 Clark Drive', 'Cranberry Twp', 'PA', '16066', '2006-05-12', 'meinkej@optonline.net', '521-455-8032', 'N'),
  (6, 'Brenna', 'Huerta', '8 Mayfair St.', 'Indiana', 'PA', '15701', '2012-06-16', 'raines@live.com', '503-325-8968', 'N'),
  (7, 'Kwabena', 'Childs', '935 Miller Avenue', 'Detroit', 'MI', '48205', '2002-04-24', 'eidac@mac.com', '686-212-1659', 'N'),
  (8, 'Jamie-Lee', 'Weir', '52 Brickyard Ave.', 'Glastonbury', 'CT', '06033', '2008-07-30', 'gospodin@mac.com', '374-940-2173', 'R'),
  (9, 'Kade', 'Peters', '7035 Dunbar St.', 'Lynchburg', 'VA', '24502', '2009-06-14', 'delpino@verizon.net', '688-957-6625', 'R'),
  (10, 'Rosalie', 'Piper', '845 E. Rockwell Ave.', 'Winter Park', 'FL', '32792', '2016-05-24', 'ideguy@aol.com', '522-917-8366', 'R'),
  (11, 'Tyler-Jay', 'Kaufman', '631 North Joy Ridge St.', 'Saint Paul', 'MN', '55104', '2018-08-25', 'dalamb@yahoo.ca', '433-584-5674', 'R');
  
  
  INSERT INTO Doctor_T (Doctor_ID, Speciality, Degree, College, CertificationDate)
  VALUES
  (1, 'Anesthesiology', 'Doctor Osteopathic Medicine', 'Harvard Medical School', '1990-03-16'),
  (2, 'Neurosurgeon', 'Doctor Osteopathic Medicine', 'Baylor College of Medicine', '1995-05-20'),
  (3, 'Transplant Surgeon', 'Doctor Osteopathic Medicine', 'Eastern Virginia Medical School', '2000-05-12');
  
  
  
  INSERT INTO Nurse_T (Nurse_ID, Speciality, Degree, College, CertificationDate)
  VALUES
  (4,'Cardiac Nurse', 'Bachelor of Science In Nursing', 'Harvard Medical School', '2002-05-13'),
  (5,'Critical Care Nurse', 'Bachelor of Science In Nursing', 'Perelman School of Medicine', '2003-04-13'),
  (6,'ER Nurse', 'Bachelor of Science In Nursing', 'Boston University School of Medicine', '2010-02-12'),
  (7,'Nursing Administrator', 'Bachelor of Science In Nursing', 'Mayo Clinic Alix School of Medicine', '2000-02-10');
  
  
  INSERT INTO Receptionist_T (Receptionist_ID, Languages, YearsOfExperience, Assigned_Doctor_ID)
  VALUES
  (8,'Japanese', '4', '1'),
  (9,'English', '6', '2'),
  (10,'Spanish', '7', '3'),
  (11,'Chinese', '9', '1');
  
  
  INSERT INTO Patient_T (Patient_ID, PatientFirstName, PatientLastName, PatientStreet, PatientCity, PatientState, PatientZipCode, PatientEmail, PatientPhone)
  VALUES
  ('301', 'Katerina', 'Lutz', '739 Lafayette St.', 'Ocean Springs', 'MS', '39564', 'psharpe@aol.com', '317-433-6415'),
  ('302', 'Joel', 'Morrow', '83 Spruce St.', 'Petersburg', 'VA', '23803', 'yzheng@me.com', '487-656-3992'),
  ('303', 'Arian', 'Bowler', '9475 Roberts Road', 'Bay City', 'MI', '48706', 'jmgomez@live.com', '433-915-0426'),
  ('304', 'Taryn', 'Ali', '9337 Windsor St.', 'Coachella', 'CA', '92236', 'okroeger@verizon.net', '597-399-1799');
  
  
  INSERT INTO Appointment_T (Appointment_ID, Date_Time, Cost, ReasonForAppointment, Patient_ID, Receptionist_ID, Doctor_ID)
  VALUES
  ('621', '2020-04-12 08:00:10', '$150', 'Leg X-Ray', '301', '8', '1'),
  ('622', '2020-08-18 10:00:05', '$110', 'Fever', '302', '9', '2'),
  ('623', '2020-05-30 11:00:13', '$100', 'Chest Pain', '303', '10', '3'),
  ('624', '2020-06-22 16:00:17', '$150', 'Chronic Pain', '304', '11', '1'),
  ('625', '2020-08-09 13:00:09', '$150', 'Blurred Vision', '301', '9', '3'),
  ('626', '2020-10-20 15:00:12', '$150', 'Ringing In Ears', '302', '8', '3');
  
   
  INSERT INTO Treatment_T (Treatment_ID, Date_Time, TreatmentDescription, Patient_ID, Nurse_ID, Doctor_ID)
  VALUES
  ('731', '2020-04-20 12:00:08', 'Wear brace to treat injured leg', '301', '5', '1'),
  ('732', '2020-08-21 14:00:06', 'Drink cough medicine once a day', '302', '7', '2'),
  ('733', '2020-06-02 17:00:09', 'Take Acetaminophen medicne to treat chest pain', '303', '5', '3');
  
  
  
  SELECT * FROM Employee_T;
  SELECT * FROM Doctor_T;
  SELECT * FROM Nurse_T;
  SELECT * FROM Receptionist_T;
  SELECT * FROM Patient_T;
  SELECT * FROM Appointment_T;
  SELECT * FROM Treatment_T;
     
  </code></pre>