Consider the following relational database schema and example database instance (primary keys are underlined; foreign ke

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Consider the following relational database schema and example database instance (primary keys are underlined; foreign ke

Post by answerhappygod »

Consider The Following Relational Database Schema And Example Database Instance Primary Keys Are Underlined Foreign Ke 1
Consider The Following Relational Database Schema And Example Database Instance Primary Keys Are Underlined Foreign Ke 1 (197.05 KiB) Viewed 21 times
Consider the following relational database schema and example database instance (primary keys are underlined; foreign keys are in italic, referring to the same attribute in a different table): Medical Centrescia, centre, address, suburb) Pattarts Ceda, name, day of birth, insurance) Appointments Ceid, cid, pid, date, tee, vaccination, payment) Medical Centres cid centre 100 101 Patients 1 2 3 Appointments aid cid 1001 100 1002 100 1003 101 1004 100 1005 101 What is the output of the following SQL query on the given example database Instance? SELECT P.name, COUNT(A.aid), SUMA.payment) FROM Patients P, Appoint wo MEP.pid Api A extract(year FROM A.date) - 2822 GROUP BY P.; (StSmith, 2, 55.00) (Cathy Freeman, 2, 20,00) (Timuthy Cahil, C, C O(Slave Smith, 3,75.00 (Cathy Freeman, 2, 20,00) O(Steve Smith, 2.55.00) (Calty Freman, 2, 20.00) O(Slave Smith, 2.55.00 (Cathy Freeman, 2, NULL pid MyHealth Medical Centre Pyrmont Doctors Steve Smith Cathy Freeman Timothy Cahill 1 12 INULL 1 name pid address George Street Union Street 06/05/2022 06/05/2022 07/05/2022 07/05/2022 16/05/2022 01/06/1989 16/02/1973 06/12/1979 date date of birth 11:00 11:15 08:15 13:45 10:00 time Medibank HFC NIB tu cavid19 measles suburb Sydney Pyrmont insurance vaccination 20.00 NULL 20.00 35.00 20.00 payment
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply