How to fetch plate_number which apeear multiple times in column
database:numbers
table name:number_plate
plate_number
45990
54667
45990
0908
54667
65534
3422
0908
output:
45990
45990
54667
54667
0908
0908
How to fetch plate_number which apeear multiple times in column
database:numbers
table name:number_plate
plate_number
45990
54667
45990
0908
54667
65534
3422
0908
output:
45990
45990
54667
54667
0908
0908
This one would give you recurring plates and number of occurrences
select plate_number, count(*)
from table
group by plate_number
having count(*) > 1
To have the exact output you wrote, you should join the query above with the table again
select t1.plate_number
from table t1
join (
select plate_number
from table
group by plate_number
having count(*) > 1
) t2
on t1.plate_number = t2.plate_number
order by t1.plate_number