Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Grouped entries #1312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Grouped entries #1312

wants to merge 1 commit into from

Conversation

simonschaufi
Copy link
Contributor

Add the ability to group timesheet entries for export

@simonschaufi
Copy link
Contributor Author

@kevinpapst any opinion? A friend of mine requested this feature and I coded it for a 🍰 in exchange ;)

@kevinpapst
Copy link
Member

The feature itself looks interesting and the query for sure is impressive ;-)

But afaik this kind of query is problematic, as this result might be "unexpected".

One problem is AFAIK that you use non-aggregated columns in the group by. I wasn't aware of that in the past as well, but some database engines will not even execute such selects (MySQL will and silently return arbitrary data). The SQL standard does not allow such queries for a reason, but MySQL decided to allow them nevertheless.

Additionally you select other columns together with these grouped results (eg statusID and budget) and those are arbitrarily selected by MySQL (there is just one column result from X grouped rows). Those are picked more or less randomly from the all grouped rows.

Hard to explain... the internet can explain it better 😁 you could search for something like this to start: https://stackoverflow.com/questions/3168042/can-i-use-non-aggregate-columns-with-group-by

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants