一些略微复杂的sql语句

来源:互联网 发布:以前qq网络硬盘 编辑:程序博客网 时间:2024/06/06 00:01

SELECT Count(DISTINCT imei) FROM data where PE_versionname = '5.0.0.88';

 

 

insert into device_version
select distinct imei, PE_versionname from data ;

 

 

 


select * from (
select imei, count(*) cnt from device_version group by imei
) a order by cnt desc limit 100;

 

 

 

select device_model,pe_version,count(*) from push_device_info where device_model in('Lenovo A780','Lenovo A288t','Lenovo A366t','Lenovo P700', 'Lenovo A789','Lenovo S880') GROUP by device_model;

 

 

 

select count(*) from push_device_info where pe_version like '%4.0.1%';

原创粉丝点击