Hello there! I want to take a moment to share a link to my GitHub repository, where you can find a collection of my frequently used SQL Server scripts. Many of these scripts leverage the system catalog, also known as the data dictionary. In addition to the GitHub link, I'd like to provide a brief … Continue reading Utilizing the System Catalog
Tag: SQL
Unit Testing vs QA When Creating ETL pipelines using SQL
Hello, everyone. I've always found the distinction between unit testing and QA testing when creating ETP pipelines using SQL to be a somewhat gray area, so I thought I would throw this into ChatGPT and see its response. One of the more important aspects I find when performing checks is to ensure you have proper … Continue reading Unit Testing vs QA When Creating ETL pipelines using SQL
Removing Git History
Here's a step-by-step guide to removing all Git commit history while retaining the current state of your files. This will also remove all branches and tags. For these instructions, I use Visual Studio Code, but this can be done all from Git Bash. Because my GitHub is public and often traversed, I want to remove … Continue reading Removing Git History
Second Highest Salary
Welcome to exploring a classic SQL interview challenge: "How many different ways can you write an SQL statement that fetches the second-highest salary?" I've been able to determine seven unique solutions, each making use of different SQL constructs, to tackle this problem. RANK() Function TOP 1 and MAX() Function OFFSET and FETCH Clauses TOP 1 … Continue reading Second Highest Salary
Advanced SQL Quiz
Hello everyone. Step right up and take the SQL Quiz challenge! Click the above link to take the challenge; read below to review my notes and ramblings. First, I’ve written hundreds of advanced SQL quiz questions that you can use in your learning adventure. This collection is a great asset for identifying gaps in your … Continue reading Advanced SQL Quiz
MERGE Statement Example
Hello, I'm not a huge fan of the MERGE statement, as I find the syntax a little clunky. Plus, there are some drawbacks to it that I mentioned in a previous post here. A quick internet search for "SQL Merge statement problems" will yield several articles about the issues with MERGE statements. However, one benefit … Continue reading MERGE Statement Example
ChatGPT: SQL as a Religion
I have noticed that ChatGPT is quite adept at refining my technical writing and providing insights for creative composition (and really horrible at answering SQL quiz questions). Recently, I came across individuals sharing their ChatGPT generated texts that create religions based on various subjects, so I thought it would be interesting to ask ChatGPT to … Continue reading ChatGPT: SQL as a Religion
Attributes, Fields, and Columns
In the context of databases, the terms attribute, field, and column are often used interchangeably, especially in relational databases. However, there are slight nuances in the way they're used within different contexts. Here, I create a blog post to quickly define the differences and nuances of these terms. If you are unfamiliar with ERD, Conceptual, … Continue reading Attributes, Fields, and Columns
Understanding Different Key Types in SQL
In the realm of database design, there are a total of twelve distinct keys to be taken into account. Primary, foreign, and unique keys are typically well-known among SQL developers, as they are implemented through SQL syntax and serve as constraints. However, when undertaking database design, it is important to consider additional key types that … Continue reading Understanding Different Key Types in SQL
ANY, ALL, and SOME equivalents
The ANY, ALL, and SOME operators in SQL Server are used to compare a value to a set of values. The SOME operator is a synonym for ANY and can be used interchangeably. These operators can be used in various ways, such as with subqueries, to filter and retrieve specific data from a table. It's … Continue reading ANY, ALL, and SOME equivalents