Note: This question is part of a series of questions that present the same scenario. Each question in
the series contains a unique solution that might meet the stated goals. Some question sets might have
more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these
questions will not appear in the review screen.
A database has two tables as shown in the following database diagram:
You need to list all provinces that have at least two large cities. A large city is defined as having a population of
at least one million residents. The query must return the following columns:
tblProvince.ProvinceId
tblProvince.ProvinceName
a derived column named LargeCityCount that presents the total count of large cities for the province
Solution: You run the following Transact-SQL statement:
Does the solution meet the goal?
A.
Yes
B.
No
Explanation:
The SQL CROSS JOIN produces a result set which is the number of rowsin the first table multiplied by thenumber of rows in the second table if no WHERE clause is used along with CROSS JOIN. This kind of result is
called as Cartesian Product.
This is not what is required in this scenario.
https://technet.microsoft.com/en-us/library/ms190690(v=sql.105).aspx
B. No.