mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2024-12-01 01:45:42 +00:00
8 lines
462 B
MySQL
8 lines
462 B
MySQL
|
--select hash, group_id, count(hash) as hash_count from files group by hash, group_id having count(*) > 1 order by hash;
|
|||
|
|
|||
|
--select hash, group_id from files group by hash, group_id having count(*) > 1 and count(order by hash;
|
|||
|
|
|||
|
select files.hash, group_id, t.ct from files inner join (
|
|||
|
select hash, count(*) as ct from files group by hash having count(distinct group_id) > 1
|
|||
|
) t on t.hash = files.hash group by files.hash, group_id, t.ct order by files.hash;
|