Introduction Into Window Functions on SQL Server
Why window functions may come in handy Let us dive directly into a real world example. You’ve got a table with salaries of different job functions and you are asked to find out what the n-tiles (quantiles, mean etc.) are of each function within a company. So this means you’ve got many people that hold a position which you want to compare with others. You want to compare salaries of marketing professionals to their peers, but you don’t want to compare said salaries to marketing directors because they have their own salary bands....