Did you work with DB2 before?
EXCEPTION JOIN is no Standard SQL (unless it was recently introduced).
When you need data from the 2nd table you can rewrite it using a LEFT JOIN plus a WHERE join_column_from_right_table IS NULL.
In your case it's probably better to use a NOT EXISTS.
Some additional remarks:
trx_date is a timestamp? Then better CAST(trx_date as DATE) instead of a formatted CHAR(8) for the join condition, you'll loose any existing statistics on that column and if it's a partitioning column, there's no partition elimination anymore.
And depending on your release you might also consider WHERE trx_date >= timestamp '2013-05-01 00:00:00' and trx_date < timestamp '2013-05-02 00:00:00'
Moving the "where (uplink + downlink) > 5242880" in the Derived Table as "HAVING (uplink + downlink) > 5242880" might also result in a better plan
Did you work with DB2 before?
EXCEPTION JOIN is no Standard SQL (unless it was recently introduced).
When you need data from the 2nd table you can rewrite it using a LEFT JOIN plus a WHERE join_column_from_right_table IS NULL.
In your case it's probably better to use a NOT EXISTS.
Some additional remarks:
trx_date is a timestamp? Then better CAST(trx_date as DATE) instead of a formatted CHAR(8) for the join condition, you'll loose any existing statistics on that column and if it's a partitioning column, there's no partition elimination anymore.
And depending on your release you might also consider WHERE trx_date >= timestamp '2013-05-01 00:00:00' and trx_date < timestamp '2013-05-02 00:00:00'
Moving the "where (uplink + downlink) > 5242880" in the Derived Table as "HAVING (uplink + downlink) > 5242880" might also result in a better plan
Dieter