Skip to content

Commit

Permalink
Sample files
Browse files Browse the repository at this point in the history
  • Loading branch information
TexanInParis committed Aug 29, 2016
1 parent 4096c86 commit 3b033f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Microsoft SQL Server/Chapter 04/Listing 4.020.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SELECT CP.CustomerID, CP.CustFirstName, CP.CustLastName
FROM CustomerProducts AS CP CROSS JOIN ProdsOfInterest AS PofI
WHERE CP.ProductName = PofI.ProductName
GROUP BY CP.CustomerID, CP.CustFIrstName, CP.CustLastName
HAVING COUNT(CP.ProductName) =
HAVING COUNT(DISTINCT CP.ProductName) =
(SELECT COUNT(ProductName) FROM ProdsOfInterest);
GO

Expand Down
2 changes: 1 addition & 1 deletion MySQL/Chapter 04/Listing 4.020.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SELECT CP.CustomerID, CP.CustFirstName, CP.CustLastName
FROM CustomerProducts AS CP CROSS JOIN ProdsOfInterest AS PofI
WHERE CP.ProductName = PofI.ProductName
GROUP BY CP.CustomerID, CP.CustFIrstName, CP.CustLastName
HAVING COUNT(CP.ProductName) =
HAVING COUNT(DISTINCT CP.ProductName) =
(SELECT COUNT(ProductName) FROM ProdsOfInterest);

DROP VIEW CustomerProducts;
Expand Down

0 comments on commit 3b033f0

Please sign in to comment.