摘要: 聚合查询 Mysql聚合函数:max\min\sum\count\avg from django.db.models import Max, Min, Sum, Avg, Count '注意大写' res = models.Book.objects.aggregate(Max('price'), M 阅读全文
posted @ 2022-05-18 22:18 扶我上码 阅读(94) 评论(0) 推荐(0)
摘要: 双下划线查询 '例:filter(age__gt=20)' '字段__查询方式=值' __gt > __lt < __gte ≥ __lte ≤ __in 成员运算 __range 范围查询 __contains 模糊查询 区分大小写 __icontains 忽略大小写 __startwith 以. 阅读全文
posted @ 2022-05-18 02:15 扶我上码 阅读(117) 评论(0) 推荐(0)