using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using System.Text; using Newtonsoft.Json; using com.zjpx.model; using System.Collections; usin
上期内容回顾 聚合查询和分组查询 # 聚合查询 max min sum avg count # 查询关键字:aggregate from django.db.models import Max, Min, Sum, Avg, Count res = Book.objects.aggregate(max_price=Max('price'), ) # 分组查询 group by """ 默认情况下,分组之后依然可以查询到所有的字段数据,如果设置为了严格模式,只能获取到分组的那个
如何写入JSON 需要第三方jar包,JSON包 //写入json数据 public static String sendJson() { JSONObject json = new JSONObject(); User user = new User("username", "address", "password", 18); json.put("user", user); return json.get("us