Query count changing when running individually versus when running with other SQL's

Database
The Teradata Database channel includes discussions around advanced Teradata features such as high-performance parallel database technology, the optimizer, mixed workload management solutions, and other related technologies.
Highlighted
Enthusiast

Query count changing when running individually versus when running with other SQL's

I have written a BTEQ script that consists of create VOLATILE statements and their corresponding INSERT Statements.

 

In my BTEQ scipt I have total of 9 volatile tables being created and loaded. Now the issue is that when I am running the query multiple times, the numbers of rows in loaded in last volatile table is getting changed in each run, however the number of rows loaded in rest of the other volatile tables that are loaded before the last volatile table remains the same.

 

One more issue is that when I run the 9th VOLATILE table query (last volatile table) individually after building the rest 8 volatile tables separately, the count remains same. However, when I execute the 9th VOLATILE table query (last volatile table)  SQL statement along with other volatiles in one go, count starts changing in each run

 

Can some one help in identifying what could be the reason of this weird behaviour and why only last volatile table is getting changed when building the table with other tables in one go?