loading...

CS403 Assignment No. 3 Spring 2012 solution

1(a). Consider the table below:                                          Marks: 5

Documentary Table

Doc_No

Title

Ranking

YearReleased

1

Hoop Dreams

A

1994

2

The Thin Blue Line

B

2000

3

Surprise Me

A

2004

4

Trouble the Water

C

2008

5

Dark Days

B

2000

6

Paris In Burning

B

1991

 

You are required to write an SQL statement using SELECT operator, which will give the following resultant table.

Title

YearReleased

The Thin Blue Line

2000

Dark Days

2000

Paris In Burning

1991 

Solution:

SQL Statement Would be:

Select Title, YearReleased

From Documentary

WHERE     Ranking = ‘B’

 

1(b). Consider the table below:                                     Marks: 5

Documentary Table

Doc_No

Title

Ranking

YearReleased

1

Hoop Dreams

A

1994

2

The Thin Blue Line

B

2000

3

Surprise Me

A

2004

4

Trouble the Water

C

2008

5

Dark Days

B

2000

6

Paris of Burning

B

1991

7

Man on Wire

A

2008

You are required to show the resultant relation that will be produced by the following SQL SELECT statement.

SELECT  Doc_No, Title, YearReleased     

FROM

Documentary

WHERE  YearReleased <>‘2000’;    

Solution:

Doc_No

Title

YearReleased

1

Hoop Dream

1994

3

Surprise Me

2004

4

Trouble the Water

2008

6

Pairs of Burning

1991

7

Man of Wire

2008

DOWNLOAD SOLUTION HERE
loading...