Skip to content

Commit

Permalink
Sample files
Browse files Browse the repository at this point in the history
  • Loading branch information
DJSteele committed Jul 30, 2016
1 parent ecaef2c commit 4471cf1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion IBM DB2/Chapter 05/Listing 5.028.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ SELECT COUNT(*) AS TotalRows,
COUNT(EmployeeID) AS TotalOrdersWithEmployees,
COUNT(DISTINCT CustomerID) AS TotalUniqueCustomers,
COUNT(CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalLargeOrders,
COUNT(DISTINCT CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalUniqueCustomersWithLargeOrders
COUNT(DISTINCT CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalUniqueCust_LargeOrders
FROM OrdersTable;

2 changes: 1 addition & 1 deletion Microsoft SQL Server/Chapter 05/Listing 5.028.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ SELECT COUNT(*) AS TotalRows,
COUNT(EmployeeID) AS TotalOrdersWithEmployees,
COUNT(DISTINCT CustomerID) AS TotalUniqueCustomers,
COUNT(CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalLargeOrders,
COUNT(DISTINCT CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalUniqueCustomersWithLargeOrders
COUNT(DISTINCT CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalUniqueCust_LargeOrders
FROM OrdersTable;

2 changes: 1 addition & 1 deletion MySQL/Chapter 05/Listing 5.028.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ SELECT COUNT(*) AS TotalRows,
COUNT(EmployeeID) AS TotalOrdersWithEmployees,
COUNT(DISTINCT CustomerID) AS TotalUniqueCustomers,
COUNT(CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalLargeOrders,
COUNT(DISTINCT CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalUniqueCustomersWithLargeOrders
COUNT(DISTINCT CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalUniqueCust_LargeOrders
FROM OrdersTable;

2 changes: 1 addition & 1 deletion PostgreSQL/Chapter 05/Listing 5.028.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ SELECT COUNT(*) AS TotalRows,
COUNT(EmployeeID) AS TotalOrdersWithEmployees,
COUNT(DISTINCT CustomerID) AS TotalUniqueCustomers,
COUNT(CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalLargeOrders,
COUNT(DISTINCT CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalUniqueCustomersWithLargeOrders
COUNT(DISTINCT CASE WHEN OrderTotal > 1000 THEN CustomerID END) AS TotalUniqueCust_LargeOrders
FROM OrdersTable;

0 comments on commit 4471cf1

Please sign in to comment.