sqlite 查询语句

基本语句结构:

SELECT [DISTINCT] column1, column2        # distinct 去重
FROM table1, table2                       # 筛选出哪些字段
WHERE [ conditions ]                      # 最开始的条件
GROUP BY column1, column2                 # 分组依据
HAVING [ conditions ]                     # 在分组后进行的条件过滤
ORDER BY column1, column2 [ASC|DESC]     # 排序
LIMIT num [OFF num]                       # 限制返回数量,off是指从偏移量 num+1 开始输出
原文地址:https://www.cnblogs.com/davis12/p/14597243.html