My bad for the redact.
You are correct I do not need the time. Is just that the database field is datatime and requires the time.
-
The database is postgresql 9.6 and the database field is datetime.
-
Here is the full sql.
SELECT res_partner_category.name, SUM(account_invoice_line.quantity)
FROM res_partner
INNER JOIN account_invoice_line ON account_invoice_line.partner_id = res_partner.id
INNER JOIN res_partner_res_partner_category_rel ON res_partner.id = res_partner_res_partner_category_rel.partner_id
INNER JOIN res_partner_category ON res_partner_category.id = res_partner_res_partner_category_rel.category_id
WHERE
account_invoice_line.booking_start > '{{start_year}}-{{start_month}}-{{start_day}} 23:59'
AND account_invoice_line.booking_end < '{{end_year}}-{{end_month}}-{{end_day}} 00:00'
AND account_invoice_line.company_id = 3
GROUP BY res_partner_category.name
-
Here is the screenshot.
Am I going about this the wrong way? Should I just use the gui based query instead of the sql way?
I am not so familiar with the gui based query.
Thank you again for continuing to help. I do appreciate it.
