【发布时间】:2013-07-25 03:49:33
【问题描述】:
我有这样的桌子
id p_id number
1 1 12
2 1 13
3 2 14
4 2 15
在我看来如何获得这些物品, 我的意思是按 p_id 分组并从组中获取数值
for p_id 1 returns count 2 and 12,13
for p_id 2 returns count 2 and 14,15
【问题讨论】:
标签: django django-views django-orm