fix: refs #7457 add with on select to reduce
This commit is contained in:
parent
0c20aea45f
commit
9ac54f463a
|
@ -23,7 +23,6 @@ module.exports = Self => {
|
||||||
arg: 'from',
|
arg: 'from',
|
||||||
type: 'date',
|
type: 'date',
|
||||||
description: 'The from date',
|
description: 'The from date',
|
||||||
required: true
|
|
||||||
}, {
|
}, {
|
||||||
arg: 'to',
|
arg: 'to',
|
||||||
type: 'date',
|
type: 'date',
|
||||||
|
@ -153,7 +152,12 @@ module.exports = Self => {
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.filter
|
CREATE OR REPLACE TEMPORARY TABLE tmp.filter
|
||||||
(INDEX (id))
|
(INDEX (id))
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT o.id,
|
WITH wOrderTicket AS(
|
||||||
|
SELECT orderFk,
|
||||||
|
ticketFk
|
||||||
|
FROM orderTicket
|
||||||
|
GROUP BY orderFk
|
||||||
|
)SELECT o.id,
|
||||||
o.total,
|
o.total,
|
||||||
o.date_send landed,
|
o.date_send landed,
|
||||||
o.date_make created,
|
o.date_make created,
|
||||||
|
|
Loading…
Reference in New Issue