Query Help

Database
Enthusiast

Query Help

I was wondering if anyone could help.  I have a table that is updated weekly with the same report with new adds or possible drops by report date.  I am looking for help to see if things dropped off with over 200000 records it very hard to eyeball it :)

For exampe:

1/2/14: apples          pink

1/2/14: apples          orange

1/4/14: apples          pink

1/4/14: apples          orange

1/4/14: apples          purple

1/6/14: apples          pink

1/6/14: apples          purple

Do you see how 1/6/14 is missing "apples orange"?  I want a query to find me all the ones that dropped off and what was added by date.. Is that possible?

3 REPLIES
Teradata Employee

Re: Query Help

Moving to the correct sub-forum i.e. Database.

Teradata Employee

Re: Query Help

Can you share DDLs, with data and actual scenario and functionality you wish to achieve?

From what it seems .... it should just be a simple OUTER JOIN query.

Enthusiast

Re: Query Help

If they are in 2 different tables having the same structure, then a minus between the current and the previous versions of the table will give the once added and the minus from the previous to the current gives the one that were dropped.