Consider the following relations Tables People (ID, Name, YearofBirth, Gender, C
ID: 3733933 • Letter: C
Question
Consider the following relations Tables People (ID, Name, YearofBirth, Gender, Country)Pittsburgh Account (ID, createdDate, bankID) own (PeoplelD, AccountiD) Bank (ID, Name, Country) Table is stored in the city: NYC DC Specify SQL expressions, and describe at least two strategies for processing of each of the following query. The queryis submitted in Chicago, and thus the results should be returned to Chicago (a) Find the numberof accounts in "PNC bank" (bank name) (b) Find the names of people who owns PNC account.Explanation / Answer
(a) select count(Account.ID) from Account, Bank where Account.bankID = Bank.ID and Bank.Name = 'PNC bank';
(b) select People.Name from People,Account,own,Bank where People.ID = own.PeopleID and own.Account.ID = Account.ID and Account.bankID = Bank.ID and Bank.Name = 'PNC account';
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.