Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
louiedogg418
Starting Member
28 Posts |
Posted - 2011-04-18 : 15:06:03
|
ok so this is the last question i have on this weeks homework, and i dont know how to interpret it...o Select employees’ last names and group them by salary in job titles, grouped into exempt and non-exempthow does one do a double group? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-04-18 : 15:16:10
|
You can group by both - but it will do exactly that - there will be each group will be for a unique combination of job title and exempt/non-exempt.If you are on SQL 2005 or higher, you might want to see if CUBE and ROLLUP would be useful. If you are on SQL 2008, GROUPING SETS would probably be your answer. |
 |
|
louiedogg418
Starting Member
28 Posts |
Posted - 2011-04-18 : 15:16:43
|
how do you do that? like group by sal, job_title, last_name group by Exempt_stat? |
 |
|
louiedogg418
Starting Member
28 Posts |
Posted - 2011-04-18 : 15:16:44
|
how do you do that? like group by sal, job_title, last_name group by Exempt_stat? |
 |
|
|
|
|