خرید بک لینک

Vote count: 0

I want to realize the sql clause just like:
select * from A group by A.a having A.b=max(A.b);

I have tried to use following clause:
A.objects.values("a").aotate(Max("b")).filter(b=Max("b"))
but this clause will group by with ("a","b") rather than ("a"),
so, how can i do with it? Thanks for your answers!
P.S. my django version is 1.9.6!

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 8 مرداد 1395 ساعت: 8:01

صفحه بندی