Ticket #11235: 11235.diff

File 11235.diff, 604 bytes (added by Tim Graham, 15 years ago)
  • docs/ref/models/querysets.txt

     
    668668
    669669    The resulting SQL of the above example would be::
    670670
    671         SELECT blog_blog.*, (SELECT COUNT(*) FROM blog_entry WHERE blog_entry.blog_id = blog_blog.id)
     671        SELECT blog_blog.*, (SELECT COUNT(*) FROM blog_entry WHERE blog_entry.blog_id = blog_blog.id) AS entry_count
    672672        FROM blog_blog;
    673673
    674674    Note that the parenthesis required by most database engines around
Back to Top