创建表

create table test( id int );

导入数据

load data local infile “D:/test.txt” into table test(id); 

显示重复数据及其出现次数且以出现次数从大到小排序

select id, count(*) from test group by id order by count(*) desc;

导出数据

select * from table into outfile 'D:/test.txt';