[SQL] Let's hear some feedback on this query 11-18-2017, 05:41 AM
#1
So, I wrote this query to run payroll for this period because I haven't finished the software implementation (which has a lot more features) yet for my client. Looking back on it, I realized that 5 years ago I would have had no idea that even half of these SQL features even existed, and wouldn't know how to use any of them beyond the basic query.
This query contains (what I'd consider non-beginner features):
2 variables
5 aliases
2 subqueries
1 case (C equivalent is the switch)
3 joins
2 groupings
2 aggregates
I also formatted this religiously. Let me know what you guys think.
fyi: this query, copuled with my database design, was able to run payroll for the entire company in 0 seconds using an azure database server
![[Image: AqDbd1d.png]](https://i.imgur.com/AqDbd1d.png)
@Skullmeat and @mothered I know at least one of you does sql stuff
This query contains (what I'd consider non-beginner features):
2 variables
5 aliases
2 subqueries
1 case (C equivalent is the switch)
3 joins
2 groupings
2 aggregates
I also formatted this religiously. Let me know what you guys think.
fyi: this query, copuled with my database design, was able to run payroll for the entire company in 0 seconds using an azure database server
![[Image: AqDbd1d.png]](https://i.imgur.com/AqDbd1d.png)
@Skullmeat and @mothered I know at least one of you does sql stuff
(This post was last modified: 11-18-2017, 05:41 AM by phyrrus9.)

























![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)




![[Image: p_237m2jx1.png]](http://c.top4top.net/p_237m2jx1.png)