Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
SQL Query Design Patterns and Best Practices

You're reading from  SQL Query Design Patterns and Best Practices

Product type Book
Published in Mar 2023
Publisher Packt
ISBN-13 9781837633289
Pages 270 pages
Edition 1st Edition
Languages
Authors (6):
Steve Hughes Steve Hughes
Profile icon Steve Hughes
Dennis Neer Dennis Neer
Profile icon Dennis Neer
Dr. Ram Babu Singh Dr. Ram Babu Singh
Profile icon Dr. Ram Babu Singh
Shabbir H. Mala Shabbir H. Mala
Profile icon Shabbir H. Mala
Leslie Andrews Leslie Andrews
Profile icon Leslie Andrews
Chi Zhang Chi Zhang
Profile icon Chi Zhang
View More author details

Table of Contents (21) Chapters

Preface 1. Part 1: Refining Your Queries to Get the Results You Need
2. Chapter 1: Reducing Rows and Columns in Your Result Sets 3. Chapter 2: Efficiently Aggregating Data 4. Chapter 3: Formatting Your Results for Easier Consumption 5. Chapter 4: Manipulating Data Results Using Conditional SQL 6. Part 2: Solving Complex Business and Data Problems in Your Queries
7. Chapter 5: Using Common Table Expressions 8. Chapter 6: Analyze Your Data Using Window Functions 9. Chapter 7: Reshaping Data with Advanced Techniques 10. Chapter 8: Impact of SQL Server Security on Query Results 11. Part 3: Optimizing Your Queries to Improve Performance
12. Chapter 9: Understanding Query Plans 13. Chapter 10: Understanding the Impact of Indexes on Query Design 14. Part 4: Working with Your Data on the Modern Data Platform
15. Chapter 11: Handling JSON Data in SQL Server 16. Chapter 12: Integrating File Data and Data Lake Content with SQL 17. Chapter 13: Organizing and Sharing Your Queries with Jupyter Notebooks 18. Index 19. Other Books You May Enjoy Appendix: Preparing Your Environment

To get the most out of this book

Software/hardware covered in the book

Operating system requirements

Microsoft Azure Storage Explorer

Windows, macOS, or Linux

SQL Server 2022 or Azure SQL Database

Windows, macOS, or Linux

Azure Data Studio

Windows, macOS, or Linux

This book covers many illustrations and examples of working with SQL to improve your overall writing and performance. To make this simple for all our users, we have chosen to use the Wide World Importers sample databases available from Microsoft. Therefore, depending on the nature of the query that we are constructing and providing examples for, one of the two databases (operational: WideWorldImporters; data warehouse: WideWorldImportersDW) provided by Microsoft will be used. Bear in that means you will have two databases to run the exercises created within this book.

It is recommended that you install the following tools on your device, as these will be used with the exercises in this book:

  • SSMS and Azure Data Studio installation. You’ll find the installation instructions at the following location: https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms. Be sure to install both SQL Server Management Studio and Azure Data Studio in the installation process.
  • Microsoft Azure Storage Explorer is used to move files in and out of Azure. You’ll find the installation instructions at this location: https://azure.microsoft.com/en-us/products/storage/storage-explorer/.
  • You can use either SQL Server 2022 or Azure SQL Database for your database platform. If you need to install SQL Server 2022 or set up Azure SQL Database, refer to the Appendix for detailed instructions.
  • All examples in this book will be using the Wide World Importers sample databases provided by Microsoft and found here: https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0. We will be using the full backups for SQL Server and the standard backups for Azure SQL DB.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Full instructions for installation and database configuration can be found in the Appendix.

lock icon The rest of the chapter is locked
Next Chapter arrow right
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}