I'm trying to collect a random sample of records from an Access table from 3 different groups/buckets. In my example, I want 50 random records from each [Duration of the Call] bucket for a total of 150 records. I join each group with a UNION clause. The results being returned are not random and each bucket of 50 are just being pulled from the first Date of the Call in 1/2/2018. It's like the TOP clause is just looking at the first 50 records in the table which match the criteria but I want truly random sample from the whole table. Thanks
SELECT * FROM (
SELECT TOP 50
[Workgroup],[Last Name],[First Name],[Titanium Number],
[Phone Number], [Inbound-Outbound], [Date of the Call], [Time of the Call],
[Duration of the Call], ID
FROM PCA_Calls WHERE
([Date of the Call] >= #1/1/2018# ) AND
([Date of the Call] <= #1/31/2018# ) AND
([Duration of the Call] >= 420) AND ([Duration of the Call] <=900) AND
([Workgroup] = "PCA0001A" )
UNION
SELECT TOP 50
[Workgroup],[Last Name],[First Name],[Titanium Number],
[Phone Number], [Inbound-Outbound], [Date of the Call], [Time of the Call],
[Duration of the Call], ID
FROM PCA_Calls WHERE
([Date of the Call] >= #1/1/2018# ) AND
([Date of the Call] <= #1/31/2018# ) AND
([Duration of the Call] >= 901) AND ([Duration of the Call] <=1800) AND
([Workgroup] = "PCA0001A" )
UNION
SELECT TOP 50
[Workgroup],[Last Name],[First Name],[Titanium Number],
[Phone Number], [Inbound-Outbound], [Date of the Call], [Time of the Call],
[Duration of the Call], ID
FROM PCA_Calls WHERE
([Date of the Call] >= #1/1/2018# ) AND
([Date of the Call] <= #1/31/2018# ) AND
([Duration of the Call] >= 1801) AND ([Duration of the Call] <=2700) AND
([Workgroup] = "PCA0001A" )
) AS Sub ORDER BY rnd(INT(NOW*ID)-NOW*ID);enter code here