mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2024-11-25 00:53:43 +00:00
7 lines
462 B
SQL
7 lines
462 B
SQL
--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;
|