Código SQL:
Ver original
SELECT username, account, COUNT( * ) AS duplica FROM ( SELECT username, account FROM bd1.accounts UNION ALL SELECT username, account FROM bd2.accounts UNION ALL SELECT username, account FROM bd3.accounts UNION ALL SELECT username, account FROM bd4.accounts UNION ALL SELECT username, account FROM bd5.accounts UNION ALL SELECT username, account FROM bd6.accounts ) AS todo GROUP BY account HAVING COUNT( * ) >1
pero quiero poder saber en cual bd estan los usuarios repetidos aver si me ayudan con esto que me tiene
