cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing counts of two tables

0 Kudos

I am a Quality Engineer and in the process of presenting a POC before purchasing the InfoSteward. I am not sure how to tackle this Quality requirement.

Compares the counts between Table A and Table B and report if there is a difference and the counts don't match.I have the source and target table sql as follows:

TARGET SQL:

select count(distinct ID) from TABLE_A where DATE<=(select max(DATE) from TABLE_A)

SOURCE SQL:

select count(distinct(ID)) FROM TABLE_B where DATE <= '#use date obtained from target sub query# group by ID

Following questions require assistance:

1. If I can create two separate views from the above two sql, how do I compare the two views?
2. How do I pass the date result obtained from target sql into the source sql?

3. How do I write a sub-query while building a view?

Accepted Solutions (0)

Answers (0)