Database Management Systems, Quiz 1
Consider the table Champions_League for given subquestions
| Name | Age | Team | Country | Goals |
|---|---|---|---|---|
| De jong | 26 | Barcelona | Netherlands | 20 |
| Bellingham | 20 | Real Madrid | England | 18 |
| Haaland | 23 | Manchester City | Norway | 18 |
| Araujo | 25 | Barcelona | Uruguay | 20 |
| Martinelli | 22 | Arsenal | Brazil | 16 |
| Mbappe | 25 | PSG | France | 16 |
| Kroos | 34 | Real Madrid | Germany | 18 |
| Dembele | 26 | PSG | France | 14 |
| Saka | 22 | Arsenal | England | 16 |
| Cubarsi | 17 | Barcelona | Spain | 12 |
Table 1: Figure 1: Champions_League
Choose the correct SQL statement that will return the resultant table given in Figure 2.
| Goals | Team | Count |
|---|---|---|
| 20 | Barcelona | 2 |
| 18 | Real Madrid | 2 |
| 18 | Manchester City | 1 |
| 16 | Arsenal | 2 |
| 16 | PSG | 1 |
| 14 | PSG | 1 |
| 12 | Barcelona | 1 |
Table 2: Figure 2: Result
Consider the table **Champions\_League** for given subquestions | Name | Age | Team | Country | Goals | |---|---|---|---|---| | De jong | 26 | Barcelona | Netherlands | 20 | | Bellingham | 20 | Real Madrid | England | 18 | | Haaland | 23 | Manchester City | Norway | 18 | | Araujo | 25 | Barcelona | Uruguay | 20 | | Martinelli | 22 | Arsenal | Brazil | 16 | | Mbappe | 25 | PSG | France | 16 | | Kroos | 34 | Real Madrid | Germany | 18 | | Dembele | 26 | PSG | France | 14 | | Saka | 22 | Arsenal | England | 16 | | Cubarsi | 17 | Barcelona | Spain | 12 | Table 1: **Figure 1: Champions_League** Choose the correct SQL statement that will return the resultant table given in Figure 2. | Goals | Team | Count | |---|---|---| | 20 | Barcelona | 2 | | 18 | Real Madrid | 2 | | 18 | Manchester City | 1 | | 16 | Arsenal | 2 | | 16 | PSG | 1 | | 14 | PSG | 1 | | 12 | Barcelona | 1 | Table 2: **Figure 2: Result** Consider the table **Champions\_League** for given subquestions | Name | Age | Team | Country | Goals | |---|---|---|---|---| | De jong | 26 | Barcelona | Netherlands | 20 | | Bellingham | 20 | Real Madrid | England | 18 | | Haaland | 23 | Manchester City | Norway | 18 | | Araujo | 25 | Barcelona | Uruguay | 20 | | Martinelli | 22 | Arsenal | Brazil | 16 | | Mbappe | 25 | PSG | France | 16 | | Kroos | 34 | Real Madrid | Germany | 18 | | Dembele | 26 | PSG | France | 14 | | Saka | 22 | Arsenal | England | 16 | | Cubarsi | 17 | Barcelona | Spain | 12 | Table 1: **Figure 1: Champions_League** Figure from the original question paper Consider the following SQL statement: Create table Cars( CarID varchar(8), CarName varchar(20), CarColour varchar(8), YearOfPurchase integer, Weight integer, primary key (CarID), check(YearOfPurchase in (1990, 2000, 2005, 2010))); Which among the following will cause an integrity constraint violation in the **Cars** table? Note: Insertions are done in the order of the options given.