Databases ID Create SQL expressions to answer the following queries. You may nee
ID: 3834468 • Letter: D
Question
Databases
ID Create SQL expressions to answer the following queries. You may need to modify the database schema to answer the queries given. 1) Identify all members of a given family. Display the family members' names, addresses, and relationships. 2) Identify all family members of a given family who volunteered to a certain activity. 3) Identify all family members of a given family who benefited from a certain project 4) Identify the total amount of money donated by the members of a given family and the projects the money was donated to. 5) In view of the information in the database, establish a criterion based on which the community center could identify residents for assistance with one of its services/activities/projects.Explanation / Answer
1. Select name, relation, address from family where surname='familyname' and familyhead='mainperson;
2. Select name from family where surname='familyname' and volunteer='activityname';
3.Select name from family where surname='familyname' and project='projectname';
4.select surname,sum(donation), project_donated from family where surname='family_name' group by surname;
5. Select name, address, phone from family where name not in( project, volunteer, service);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.