Question: Code the following queries in SQL: The following tables include information about tourists, their organizations, some organizations may have planned tours and information is kept

Code the following queries in SQL:

Code the following queries in SQL: The following tables include information about

The following tables include information about tourists, their organizations, some organizations may have planned tours and information is kept about the tourists to participate in each tour; a tourist may work-for more than one organization. A tourist may participate in any tour whether organized by his/her organization or not. Each tourist has a city and a country where they live which may be different than their citizenship. Note that tid means tourist ID, code means tour code, org_name means organization name, sin_fd1 and sin_fd2 represent sin numbers of a person and his/her friend, citizenship is a country Tour(code, city, country, time, day) Participate(tid, code, class) Works-for(tid,org-name) Tourist(tid, sin, name, citizenship, city, country, age, gender) Organization(name, code, leader-tid, leader-sin, city, year_started) Friend(sin_fdi, sin_fd2) Code the following queries in SQL: a) Find codes of tours which do not have any first-class participant who lives in Canada? b) Find the number and average age of tourists who participated in at least one tour with an Italian tourist? c) Find the name of each organization whose leader is a tourist who lives in the same city where the organization is located

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!