SQL is foundational in web and application programming. There are many websites and resources online to learn SQL. I like these 5 websites and think you will too…
(more…)Database Programming
Simulate LEAD() Window Function using correlated subquery
In my honest opinion, MS Access is one garbage of a database. More likely, database is too strong of a word. While I won’t be using Access in this article, there is a story there (but I’m not here to have an Access bash party). Continue reading for an example of how you may use a correlated subquery and simulate the LEAD() Window Function.
(more…)INTERSECT and EXCEPT commands in MySQL
MySQL now supports the INTERSECT and EXCEPT set operators. Set operators work on the results of multiple SELECT statements. In this post, we will see example queries using INTERSECT and EXCEPT commands for a better understanding
(more…)INSERT Using the WITH Clause in MySQL
As of MySQL v8, we have Common Table Expressions (CTEs) or the WITH clause available. I recently learned how to use the WITH clause in an INSERT statement, similar to INSERT with SELECT. Like always, I enjoy sharing what I learn so let’s all learn together…
(more…)How To Combine Window Functions in MySQL
Window Functions operate on groups of rows, returning a value for every row in the group, unlike Aggregate Functions which collapse rows into a single value. With the many different Window Functions available, can you combine them at the same level? Learn more in this article.
(more…)