<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: having</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/having.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2008-11-08T23:49:15+00:00</updated><author><name>Simon Willison</name></author><entry><title>Secrets of the Django ORM</title><link href="https://simonwillison.net/2008/Nov/8/secrets/#atom-tag" rel="alternate"/><published>2008-11-08T23:49:15+00:00</published><updated>2008-11-08T23:49:15+00:00</updated><id>https://simonwillison.net/2008/Nov/8/secrets/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.eflorenzano.com/blog/post/secrets-django-orm/"&gt;Secrets of the Django ORM&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
An undocumented (and unsupported) method of poking a Django QuerySet’s internal query to add group_by and having clauses to a SQL query.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/groupby"&gt;groupby&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/having"&gt;having&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/orm"&gt;orm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/queryset"&gt;queryset&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sql"&gt;sql&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="groupby"/><category term="having"/><category term="orm"/><category term="python"/><category term="queryset"/><category term="sql"/></entry></feed>