I need a sample after I join the two tables, for example:
SELECT *
from
A left join B
on A.col=B.col
sample 1000000
The problem is that A and B are huge (over 3 billion lines), and when I start the connection, I end the spool space.
Is there a way to do a join after the sample, so that it joins with smaller tables (for example, select 10,000,000 samples from A and B, inner join with them and select 1,000,000 from the join, hoping I get less than 1,000,000 lines?)
PS I am using teradata p>
source
share