如何对查询Qualifications
进行分组并按quote__uuid
对其进行分组?我调查aggregation,但似乎不符合我的需要。
我的理想输出是[{'quote_uuid_1':[qualification_1, qualification_2], 'quote_uuid_2':[qualification_3] }]
class Quote
uuid = models.CharField()
class Qualification
quote = models.ForeignKey(Quote)
答案 0 :(得分:1)
尝试:
Sub CellFormula()
Dim Cell As Variant
For Each Cell In Selection
Cell.Formula = "=$B$1*" & Cell.Value
Next
End Sub