31 Jul 2017 Marek Pankowski How Recursive Common Table Expressions Work Recursive Common Table Expressions are immensely useful when you're querying hierarchical data. Let's explore what makes them work. Common Table Expressions (CTEs) are some of the most useful constructions in SQL. Their main purpose is improving query design, which makes queries easier to read. One of the reasons CTEs are so popular is that they let you divide longer queries into shorter subqueries. These are easier to read and edit. Read more 23 Jun 2017 Marek Pankowski SQL Set Operators: Union, Union All, Minus, Intersect Ever heard terms such as union and intersection in SQL? They're examples of set operators, and they come in handy when you need to combine information from multiple tables or queries. In this article, we'll take a closer look at them. SQL queries let us choose the most important bits from large amounts of information. Of course, we can't expect that all necessary data will be stored in one table. Read more 4 May 2017 Marek Pankowski Book Review: “Learn SQL the Hard Way” by Zed A. Shaw “Learn SQL the Hard Way” by Zed A. Shaw is a great ebook for those who want to learn SQL essentials. At $19.99 USD, it may seem a bit expensive for an ebook, but you’re getting a DRM-free PDF, plus a whole bunch of explanatory videos and additional files. Who should read “Learn SQL the Hard Way”? Anyone interested in SQL basics – modifying databases or selecting information. Make no mistake about it: this book focuses heavily on the practical side of database language. Read more 13 Apr 2017 Marek Pankowski 5 SQL Functions for Manipulating Strings SQL functions used for manipulating strings, commonly called string functions, are among most important SQL’s tools. In this post, we’ll look at five ways you can perform various operations on strings. There are many SQL functions that let you “edit” string data. As you learn SQL, you’ll see how useful they prove. Some sql trim off unneeded spaces or characters; others tell you how long a string is. These functions give you a lot of opportunities to transform and work with strings, which makes your code more effective. Read more 30 Mar 2017 Marek Pankowski How to Organize SQL Queries When They Get Long The first long SQL query you’ll have to deal with is likely to be hard for you to structure and understand. These five tips will teach you the best way to organize SQL queries, i.e. write and format them. As we all know, SQL queries are essential to database management. Without them, it would be extremely difficult to find and work with the information in a database. Query length depends on the type of information we need and the size of the database. Read more 14 Mar 2017 Marek Pankowski Common SQL Job Interview Questions Congratulations! Your SQL skills were strong enough to get you that job interview! Now, if you only knew what SQL questions and practical exercises a recruiter might ask you to do… This article is meant as a SQL practice for interviews. I’ll help you prepare for the SQL and database aspects of your job interview. Knowing SQL opens up opportunities in and out of IT, as this query language is used practically everywhere. Read more