AlisdairO / pgexercises

PostgreSQL Exercises web site code
Other
400 stars 62 forks source link

Use ROLLUP operator for fachoursbymonth3 example #22

Closed felixge closed 7 years ago

felixge commented 8 years ago

The patch also simplifies the where clause to be more readable, but it's worth noting that the new version will likely prevent postgres from deriving optimal query plans in the presence of an index on the starttime column. But IMO performance concerns are beyond the scope of this project, so I think it's a fair tradeoff.

Note: I did not setup a local dev environment, but hopefully I didn't break anything ;).

Fixes #14

AlisdairO commented 8 years ago

Many thanks for the PR! I may be a bit slow reviewing it - mid emigration at the moment - but I will get to it as soon as I can.

felixge commented 8 years ago

@AlisdairO take your time :). And thank you so much for this project! We just migrated a large reporting system from a NoSQL db to Postgres, and I've recommended your exercises to all our team members who are interested in improving their SQL skills.

AlisdairO commented 8 years ago

Thanks, I really appreciate it :-)

felixge commented 7 years ago

Ok, I'll try to get your comments addressed in the next couple of days.

AlisdairO commented 7 years ago

Thanks a lot :-)

AlisdairO commented 7 years ago

Hey, apologies for this, but as this PR seems to have become inactive and I wanted to close out the issue, I've written up the exercise myself. Hope you don't mind too much - I appreciate your help!

felixge commented 7 years ago

@AlisdairO sorry for not getting back to you on this. But thanks for adding ROLLUP to your exercises :)

AlisdairO commented 7 years ago

No worries! :-)