SELECT
c.name as Customer,
u.username as Username,
u.alias as User,
FORMAT(SUM(t.duration) / 3600, 0) as Duration
FROM
kimai2_timesheet t
LEFT JOIN kimai2_projects p on t.project_id = p.id
LEFT JOIN kimai2_customers c on p.customer_id = c.id
LEFT JOIN kimai2_users u on t.user = u.id
GROUP BY
c.id, t.user, c.name, u.username, u.alias
;
This shows LEFT JOIN on projects and users. But it also seems from the GUI that those are required fields. If that is case then these should instead be JOIN instead.
Describe the issue
On the page https://www.kimai.org/documentation/sql-examples.html
it shows several SQL queries.
Here is one example:
This shows
LEFT JOIN
on projects and users. But it also seems from the GUI that those are required fields. If that is case then these should instead beJOIN
instead.I already tried
Kimai version
2
How do you run Kimai?
KIMAI CLOUD
Which PHP version are you using?
8.1
Logfile
No response
Screenshots
No response