here is a prototype for your script:
replace TEST with your current Load Statement
TEST:
LOAD * INLINE [
Date, Worker, Label
14, 1, N
14, 2, N
15, 1, Y
15, 2, Y
16, 2, A
16, 1, C
16, 1, F
16, 1, B
16, 1, G
];
inner join
Load Date,
count(distinct Label) as EXPR_1
Resident TEST
Where len(trim(Worker))>0
GROUP BY Date
;
regards
tim