Expert T-SQL Window Functions in SQL Server 2019 (eBook)
XVIII, 213 Seiten
Apress (Verlag)
978-1-4842-5197-3 (ISBN)
- Solve complex query problems without cumbersome self-joins that run slowly and are difficult to read
- Create sliding windows in a result set for computing such as running totals and moving averages
- Return aggregate and detail data simultaneously from the same SELECT statement
- Compute lag and lead and other values that access data from multiple rows in a result set
- Understand the OVER clause syntax and how to control the window
- Avoid framing errors that can lead to unexpected results
Clayton Groom is a data warehouse and analytics consultant at Clayton Groom, LLC. He has worked with SQL Server for 25 years. His expertise lies in designing and building data warehouse and analytic solutions on the Microsoft technology stack, including Power BI, SQL Server, Analysis Services, Reporting Services and Excel.
Become an expert who can use window functions to solve T-SQL query problems. Replace slow cursors and self-joins with queries that are easy to write and perform better. This new edition provides expanded examples, including a chapter from the world of sports, and covers the latest performance enhancements through SQL Server 2019. Window functions are useful in analytics and business intelligence reporting. They came into full blossom with SQL Server 2012, yet they are not as well known and used as often as they ought to be. This group of functions is one of the most notable developments in SQL, and this book shows how every developer and DBA can benefit from their expressive power in solving day-to-day business problems. Once you begin using window functions, such as ROW_NUMBER and LAG, you will discover many ways to use them. You will approach SQL Server queries in a different way, thinking about sets of data instead of individual rows. Your querieswill run faster, be easier to write, and easier to deconstruct, maintain, and enhance in the future.Just knowing and using these functions is not enough. You also need to understand how to tune the queries. Expert T-SQL Window Functions in SQL Server clearly explains how to get the best performance. The book also covers the rare cases when older techniques are the best bet.What You Will LearnSolve complex query problems without cumbersome self-joins that run slowly and are difficult to readCreate sliding windows in a result set for computing such as running totals and moving averagesReturn aggregate and detail data simultaneously from the same SELECT statementCompute lag and lead and other values that access data from multiple rows in a result setUnderstand the OVER clause syntax and how to control the windowAvoid framing errors that can lead to unexpected resultsWho This Book Is For Anyone who writes T-SQL queries, including database administrators, developers, business analysts, and data scientists. Before reading this book, you should understand how to join tables, write WHERE clauses, and build aggregate queries.
Erscheint lt. Verlag | 21.10.2019 |
---|---|
Zusatzinfo | XVIII, 213 p. 123 illus. |
Sprache | englisch |
Themenwelt | Informatik ► Datenbanken ► SQL Server |
Mathematik / Informatik ► Informatik ► Programmiersprachen / -werkzeuge | |
Mathematik / Informatik ► Informatik ► Software Entwicklung | |
Informatik ► Theorie / Studium ► Compilerbau | |
Schlagworte | Aggregate functions • Analytic functions • Business Intelligence • FIRST_VALUE • LAG and LEAD • LAST_VALUE • Moving Averages • rank • ranking functions • ROW_NUMBER • Running totals • SQL |
ISBN-10 | 1-4842-5197-0 / 1484251970 |
ISBN-13 | 978-1-4842-5197-3 / 9781484251973 |
Haben Sie eine Frage zum Produkt? |
Größe: 10,3 MB
DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasserzeichen und ist damit für Sie personalisiert. Bei einer missbräuchlichen Weitergabe des eBooks an Dritte ist eine Rückverfolgung an die Quelle möglich.
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich