1

How do I use the django query? The following is a written sql statement:

SELECT a.name, count(uri_id) as counts from interface_uri a LEFT JOIN interface_interfacetestcase b on a.id = b.uri_id GROUP BY a.name, a.version_id;
Avinash Raj
  • 172,303
  • 28
  • 230
  • 274
yer
  • 11
  • 2
  • Helio, you can use annotate or aggregate. Here the difference: http://stackoverflow.com/questions/7981837/difference-between-djangos-annotate-and-aggregate-methods – Soleronline Mar 22 '17 at 08:03
  • I am sorry, in the same data sheet inquiries I will be, but in the two tables between the joint query and seeking do not know what method? For example, between a table to write: `Uri.objects.values('name').annotate(count=Count('name'))` How to write between the two? – yer Mar 22 '17 at 08:19

0 Answers0