-- biometry: Session_ID deve ser único
SELECT Session_ID,
    COUNT(*) AS dup
FROM `ifood-prev-fraude-case.fraude_biometria.biometry`
GROUP BY Session_ID
HAVING COUNT(*) > 1
ORDER BY dup DESC;

-- biometry_execution: um registro por (Session_ID, Provider)
SELECT Session_ID,
    Provider,
    COUNT(*) AS dup
FROM `ifood-prev-fraude-case.fraude_biometria.biometry_execution`
GROUP BY Session_ID,
    Provider
HAVING COUNT(*) > 1
ORDER BY dup DESC;

-- orders: Order_ID deve ser único
SELECT Order_ID,
    COUNT(*) AS dup
FROM `ifood-prev-fraude-case.fraude_biometria.orders`
GROUP BY Order_ID
HAVING COUNT(*) > 1
ORDER BY dup DESC;

-- drivers: Driver_ID deve ser único
SELECT Driver_ID,
    COUNT(*) AS dup
FROM `ifood-prev-fraude-case.fraude_biometria.drivers`
GROUP BY Driver_ID
HAVING COUNT(*) > 1
ORDER BY dup DESC;