Changes between Initial Version and Version 1 of Ticket #27812
- Timestamp:
- Feb 6, 2017, 10:36:12 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27812 – Description
initial v1 6 6 print(qs1 ) 7 7 <QuerySet [{'tipo_documento': 'FV', 'total': Decimal('8419159.0000')}, {'tipo_documento': 'FY', 'total': Decimal('12500000.0000')}, {'tipo_documento': 'FY', 'total': Decimal('210000.0000')}... 8 }}} 9 10 debug_toolbar shows, effectively is grouping by "document_date", but I have just "tipo_documento" in values: 11 {{{ 12 SELECT `biable_facturasbiable`.`tipo_documento`, SUM(`biable_facturasbiable`.`venta_neto`) AS `cosa` FROM `biable_facturasbiable` GROUP BY `biable_facturasbiable`.`tipo_documento`, `biable_facturasbiable`.`document_date` ORDER BY `biable_facturasbiable`.`document_date` DESC LIMIT 21 8 13 }}} 9 14 … … 19 24 qs2 works properly. I have tried to do the same example with another models and I have got the same issue. 20 25 26 debug_toolbar shows: 27 28 {{{ 29 SELECT `biable_movimientoventabiable`.`tipo_documento`, SUM(`biable_movimientoventabiable`.`venta_neto`) AS `cosa` FROM `biable_movimientoventabiable` GROUP BY `biable_movimientoventabiable`.`tipo_documento` ORDER BY NULL LIMIT 21 30 }}} 31 21 32 22 33 Thanks