Skip to content

Commit

Permalink
Sample Files
Browse files Browse the repository at this point in the history
  • Loading branch information
DJSteele committed Oct 8, 2016
1 parent 9ce49a9 commit bff7104
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
5 changes: 2 additions & 3 deletions IBM DB2/Chapter 09/Listing 9.025.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ FROM ztblQuarters AS Z CROSS JOIN
E.StartDate, E.ContractPrice
FROM Agents AS A LEFT JOIN Engagements AS E
ON A.AgentID = E.AgentID) AS AE
WHERE AE.StartDate BETWEEN Z.QuarterStart AND Z.QuarterEnd
OR AE.StartDate IS NULL
AND Z.YearNumber = 2015
WHERE (AE.StartDate BETWEEN Z.QuarterStart AND Z.QuarterEnd)
OR (AE.StartDate IS NULL AND Z.YearNumber = 2015)
GROUP BY AgtFirstName, AgtLastName, YearNumber;
5 changes: 2 additions & 3 deletions Microsoft SQL Server/Chapter 09/Listing 9.025.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ FROM ztblQuarters AS Z CROSS JOIN
E.StartDate, E.ContractPrice
FROM Agents AS A LEFT JOIN Engagements AS E
ON A.AgentID = E.AgentID) AS AE
WHERE AE.StartDate BETWEEN Z.QuarterStart AND Z.QuarterEnd
OR AE.StartDate IS NULL
AND Z.YearNumber = 2015
WHERE (AE.StartDate BETWEEN Z.QuarterStart AND Z.QuarterEnd)
OR (AE.StartDate IS NULL AND Z.YearNumber = 2015)
GROUP BY AgtFirstName, AgtLastName, YearNumber;
5 changes: 2 additions & 3 deletions MySQL/Chapter 09/Listing 9.025.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ FROM ztblQuarters AS Z CROSS JOIN
E.StartDate, E.ContractPrice
FROM Agents AS A LEFT JOIN Engagements AS E
ON A.AgentID = E.AgentID) AS AE
WHERE AE.StartDate BETWEEN Z.QuarterStart AND Z.QuarterEnd
OR AE.StartDate IS NULL
AND Z.YearNumber = 2015
WHERE (AE.StartDate BETWEEN Z.QuarterStart AND Z.QuarterEnd)
OR (AE.StartDate IS NULL AND Z.YearNumber = 2015)
GROUP BY AgtFirstName, AgtLastName, YearNumber;
5 changes: 2 additions & 3 deletions Oracle/Chapter 09/Listing 9.025.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ FROM ztblQuarters Z CROSS JOIN
E.StartDate, E.ContractPrice
FROM Agents A LEFT JOIN Engagements E
ON A.AgentID = E.AgentID) AE
WHERE AE.StartDate BETWEEN Z.QuarterStart AND Z.QuarterEnd
OR AE.StartDate IS NULL
AND Z.YearNumber = 2015
WHERE (AE.StartDate BETWEEN Z.QuarterStart AND Z.QuarterEnd)
OR (AE.StartDate IS NULL AND Z.YearNumber = 2015)
GROUP BY AgtFirstName, AgtLastName, YearNumber;
5 changes: 2 additions & 3 deletions PostgreSQL/Chapter 09/Listing 9.025.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ FROM ztblQuarters AS Z CROSS JOIN
E.StartDate, E.ContractPrice
FROM Agents AS A LEFT JOIN Engagements AS E
ON A.AgentID = E.AgentID) AS AE
WHERE AE.StartDate BETWEEN Z.QuarterStart AND Z.QuarterEnd
OR AE.StartDate IS NULL
AND Z.YearNumber = 2015
WHERE (AE.StartDate BETWEEN Z.QuarterStart AND Z.QuarterEnd)
OR (AE.StartDate IS NULL AND Z.YearNumber = 2015)
GROUP BY AgtFirstName, AgtLastName, YearNumber;

0 comments on commit bff7104

Please sign in to comment.