Write a query in SQL to find the name and medication for those patients who did not take any appointment
- برمجة سي كيو ال sql
- 2021-09-06
- mhanasmh00489829403
الأجوبة
SELECT t.name AS "Patient",
p.name AS "Physician",
m.name AS "Medication"
FROM patient t
JOIN prescribes s ON s.patient=t.ssn
JOIN physician p ON s.physician=p.employeeid
JOIN medication m ON s.medication=m.code
WHERE s.appointment IS NULL;
Sample Output:
Patient | Physician | Medication ------------+-------------+------------ Dennis Doe | Molly Clock | Thesisin (1 row)
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال