Trying to create a dashboard using the following query -
select a.distinct_id,
trunc(a.dte) Transaction_Date,
a.dte,
a.activity,
a.part,
a.loading,
a.user_name,
a.device,
a.fromloc,
a.toloc,
a.to_area,
b.NAME||' '||b.Surname Name,
a.qty,
DECODE(d.workarea, 'Tables','Wood','Metal')Material
from table a, table b, table c, table d
where (a.toloc = d.storage
and a.part = c.part and c.region = 'Country1'
and a.dte > trunc(sysdate) - '9'
and a.region = 'Country1'
and a.activity = 'IDENTIFY'
and a.user_name = b.user_name
and d.maxarea <> 0 )
When I remove the last constraint from the where statement (ie d.maxarea <> 0) the output does not show repeats but when I add that in the query again, it shows repetitive records with the same distinct_id.