***
1,查询某一列下重复数据:
select * from company_invoice where company_id in (select company_id from company_invoice group by company_id having COUNT(*)>1)
***
2,查询一张表中两个字段相同值
select parking_id, source_id from public.parking where parking_id = source_id
***
3,多表联查
select c.parking_id, c.parking_name, c.parking_relation_id, s.park_id from public.parking c join public.parking_relation s on c.parking_id = s.parking_id
***