Question: Please answer this consider the following relational model CREATE TABLE Movies ( MID int Primary key, Title varchar(20), Released int ); CREATE TABLE Person( PID

Please answer this

consider the following relational model CREATE TABLE Movies ( MID int Primary key, Title varchar(20), Released int ); CREATE TABLE Person( PID

Answer all the following SQL queries (you could not use a database to do that)

1. select * from movies order by released;

2. select* from movies where title like 'Star %';

3. select DISTINCT p.name from movies m, person p, Participate pp, Roles r where r.role_dsc='director' and pp.pid=p.pid and r.rid=pp.rid and m.mid=pp.mid;

4. select DISTINCT pp.mid, pp.pid from movies m, person p, Participate pp, Roles r where pp.pid = p.pid and r.rid

5. select DISTINCT pp.mid, count(*) from movies m, Participate pp where m.mid = pp.mid group by pp.mid

Please

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!