
188 OnDemand SQL Performance Analysis Simplified on DB2 for i5/OS in V5R4
Example 6-8 Common columns from the 3010 record
WITH aa AS
(SELECT * FROM mydbmon WHERE qqrid = 3010),
bb AS
(SELECT * FROM mydbmon WHERE qqrid = 1000 AND qqc21 IN
('OP','SI','SK','IN','UP','DL'))
SELECT a.qqrid, a.qqjnum, a.qqucnt, a.qqi5, a.qq1000, b.qq1000
FROM aa a LEFT JOIN bb b ON a.qqjnum = b.qqjnum AND a.qqucnt = b.qqucnt;
The results of the query shown in Example 6-8 are displayed in Figure 6-9. The query shows
shows the Host variables and the associated SQL statement for each instance of the SQL
statement by job.
Figure 6-9 Common columns from the 3010 record
6.1.12 ...