Doctor Name Specialty DSSN DOCTOR Date prescribes M Pre ne PRESCRIPTION M Consist_of Pharmacy Name Address Phone N N Nam

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

Doctor Name Specialty DSSN DOCTOR Date prescribes M Pre ne PRESCRIPTION M Consist_of Pharmacy Name Address Phone N N Nam

Post by answerhappygod »

Doctor Name Specialty Dssn Doctor Date Prescribes M Pre Ne Prescription M Consist Of Pharmacy Name Address Phone N N Nam 1
Doctor Name Specialty Dssn Doctor Date Prescribes M Pre Ne Prescription M Consist Of Pharmacy Name Address Phone N N Nam 1 (28.84 KiB) Viewed 73 times
It's my SQL.....
Doctor Name Specialty DSSN DOCTOR Date prescribes M Pre ne PRESCRIPTION M Consist_of Pharmacy Name Address Phone N N Name N M DRUG Sells PHARMACY Formula M Price Makes PHARMACEUTICAL COMPANY Phone Compang Name

Doctor (dssn dname, specialty) Prescription( dssn. pre_no, pdate) foreign key (dssn) references to doctor(dssn) Ph_company( pname, phone) Drug (pname, trade_name, formula) foreign key (pname) references to Ph_company(pname) Consist of (dsen, pre_no, pname, trade name) foreign key (dssn, pre_no) references prescription(dssn, pre_no), foreign key (pname, trade_name) references drug(panme, trade_name) Pharmacy (pcy_name, address, phone) Sell (pharmacy name, pname, trade name price) foreign key (pname, trade_name) references drug (pname, trade_name), foreign key (pharmacy_name) references pharmacy (pcy_name)

5) Retrieve number of type of drugs made by 'Pfizer". (Type is distinguished by "trade_name"). 6) Obtain information (pharmacy name, address) of pharmacy that sells “Ibuprofen" with the highest price among all pharmacies. ("Ibuprofen" is a trade name) 7) Retrieve the pharmacies that sell more than 2 types of drugs. List pharmacy name and number of types of drugs sold. (Type is distinguished by "trade_name". However, if two drugs with the same trade name are produced by two different pharmaceutical companies, they are considered as two different types of drugs.)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply