1.查询结果去重
关键字:distinct (放在查询的后面)
AC:
select distinct university from user_profile
2.查询结果限制返回行数
关键字:limit
AC:
select device_id from user_profile limit 0,2
3.将查询后的列重新命名
关键字:as
AC:
select device_id as user_infos_example from user_profile limit 0,2
4.查找后排序
关键字:order by asc/desc (升/降)
AC:
select device_id,age from user_profile order by age asc
5.查找后多列排序
多次条件限定用逗号来间隔.
AC:
select device_id,gpa,age from user_profile order by gpa asc,age asc