I have two tables: RDat1 and RDat2. I am trying to find the number of cases in which publisher_id in R1 does not match what was in publisher_id in R2, in the time interval from 2015-01 to 2015-06. I am joining two tables based on a shared key in queue_id. Here is the query I wrote, but it will always return 0 ...
Select count(*)
from RDat1 r1
join RDat2 r2 on r2.queue_id = r1.queue_id
where r1.publisher_id <> r2.publisher_id and r1.lead_time between
'2015-01-01 00:00:00' and '2015-06-30 23:59:59'
;
source
share