Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CODE IN SQL The following tables include information about volunteers, their organizations, their planned projects, and volunteers who will participate in each project; a volunteer

CODE IN SQL
The following tables include information about volunteers, their organizations, their planned projects, and volunteers who
will participate in each project; a volunteer may be member in more than one organization. Friend is a table which includes
in each row sin numbers of two friends who may or may not be volunteers
Note that vid is volunteer ID, code is project code, org_name is organization name, sin_fd1 and sin_fd2 represent sin
numbers of two friends, citizenship is a country
Project(code, city, country, time, day) Participate(vid, code, role)
Member(vid,org-name) Volunteer(vid, sin, name, city, citizenship, age, gender)
Friend(sin_fd1, sin_fd2) Organization(name, leader-vid, leader-sin, city, year_started)
1. Find vids and roles of volunteers who participated in at least one project in Uganda? (Uganda is a country) 2. For cities where there are projects but no volunteers? 3. For cities which have at least one organization and at least one volunteer, find number of organizations and number of volunteers in each such city? 4. Find the name of each organization whose leader have only friends who volunteered? 5. Find name of every female volunteer who only participated in all projects in her city? 6. Find codes of projects which are located inside countries from which there is at least one male volunteer over 50 years old?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions

Question

=+Which associations exist?

Answered: 1 week ago