-- Perfil geral
SELECT 'biometry' AS tabela,
  COUNT(*) AS linhas,
  COUNTIF(Session_ID IS NULL) AS null_pk,
  COUNT(DISTINCT Session_ID) AS distintos_pk
FROM `ifood-prev-fraude-case.fraude_biometria.biometry`
UNION ALL
SELECT 'biometry_execution',
  COUNT(*),
  COUNTIF(Session_ID IS NULL),
  COUNT(DISTINCT CONCAT(Session_ID, '|', Provider))
FROM `ifood-prev-fraude-case.fraude_biometria.biometry_execution`
UNION ALL
SELECT 'orders',
  COUNT(*),
  COUNTIF(Order_ID IS NULL),
  COUNT(DISTINCT Order_ID)
FROM `ifood-prev-fraude-case.fraude_biometria.orders`
UNION ALL
SELECT 'drivers',
  COUNT(*),
  COUNTIF(Driver_ID IS NULL),
  COUNT(DISTINCT Driver_ID)
FROM `ifood-prev-fraude-case.fraude_biometria.drivers`;
