Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2.56 Write an SQL statement to display the SKU, SKU_Description, and Department

ID: 3883370 • Letter: 2

Question

2.56 Write an SQL statement to display the SKU, SKU_Description, and Department of all SKUs that appear in either the Cape Codd 2013 catalog (either in the printed catalog or on the Web site) or the Cape Codd 2014 catalog (either in the printed catalog or on the Web site) or both.

2.57 Write an SQL statement to display the SKU, SKU_Description, and Department of all SKUs that appear in either the Cape Codd 2013 catalog (only in the printed catalog itelf) or the Cape Codd 2014 catalog (only in the printed catalog itself) or both.

2.58 Write an SQL statement to display the SKU, SKU_Description, and Department of all SKUs that appear in both the Cape Codd 2013 catalog (either in the printed catalog or on the Web site) and the Cape Codd 2014 catalog (either in the printed catalog or on the Web site).

2.59 Write an SQL statement to display the SKU, SKU_Description, and Department of all SKUs that appear in both the Cape Codd 2013 catalog (only in the printed catalog itelf) and the Cape Codd 2014 catalog (only in the printed catalog itself) or both.

2.60 Write an SQL statement to display the SKU, SKU_Description, and Department of all SKUs that appear in only the Cape Codd 2013 catalog (either in the printed catalog or on the Web site) and not in the Cape Codd 2014 catalog (either in the printed catalog or on the Web site).

Explanation / Answer

2.56

Select SKU, SKU_Description, Department from Catalog_SKU_2013 union Select SKU, SKU_Description, Department from Catalog_SKU_2014.;

2.57

Select SKU, SKU_Description, Department from Catalog_SKU_2013 where CatalogPage is not null union Select SKU, SKU_Description, Department from Catalogue_SKU_2014 where CatalogPage is not null.;

2.58

Select SKU, SKU_Description, Department from Catalogue_SKU_2013 intersect Select SKU, SKU_Description, Department from Catalogue_SKU_2014;

2.59

Select SKU, SKU_Description, Department from Catalogue_SKU_2013 where CatalogPage is not null intersect Select SKU, SKU_Description, Department from Catalogue_SKU_2014 where CatalogPage is not null ;

2.60

Select SKU, SKU_Description, Department from Catalogue_SKU_2013 minus Select SKU, SKU_Description, Department from Catalogue_SKU_2014;