20 Jan 2022 Andrew Bone 10 PostgreSQL Interview Questions and Answers Job interviews are always stressful. Interviewing and getting asked technical questions about PostgreSQL is even more of a challenge! In this article, we’ll cover some of the PostgreSQL interview questions you can expect when applying for a new job. By the end of the article, you should be able to handle most of the questions you are likely to face. We’ve previously covered common questions you can expect at a SQL job interview, but this article will be focused on Postgres specifically. Read more 3 Nov 2021 Andrew Bone What Is the DELETE Statement in SQL? This article will explain the use of the DELETE statement, one of the primary methods of removing existing records from your database. First we will run through the syntax, followed by some easy-to-understand examples. The DELETE statement in SQL is extremely useful. It allows you to remove any obsolete or “bad” data from your database tables. You should exercise caution when using the DELETE statement, as the operation is not reversible. Read more 12 Oct 2021 Andrew Bone Numeric vs. Decimal Data Types in SQL In standard SQL, there is a slight difference between the NUMERIC and DECIMAL data types. However, in some variants of SQL, there is no difference! This article will clear up any confusion. In this article, I’ll explain the differences and similarities between SQL’s standard NUMERIC and DECIMAL data types. Then I’ll discuss how these data types work in common SQL dialects. We’ve already posted a more general article on SQL data types; this time, we’ll drill down further on just the DECIMAL and NUMERIC data types. Read more 8 Oct 2021 Andrew Bone How to Sort Values in a Specific Order in SQL Sometimes you will be required to order your data in a particular way, and often the use of typical sort modifiers like ASC and DESC are not enough. This article will show you how to use the CASE statement to order your data exactly how you need it to be. Have you ever needed to order your data in a very specific way? One of the best methods for handling complex sorting is using CASE. Read more 14 Sep 2021 Andrew Bone How to Use Aliases with SQL JOINs SQL aliases are custom names that you can give to the columns and tables you include in your queries. Aliases are very useful, as they can greatly improve the readability and maintainability of your query. We’ll be taking a closer look at using SQL aliases with JOIN and why you might need to do so. The best way to master aliases in SQL is practice. I recommend our interactive SQL Practice Set course. Read more 10 Aug 2021 Andrew Bone What Is the UPDATE Statement in SQL? The SQL UPDATE statement is used to update existing data in your database. This article will explain its syntax and show you clear examples of the UPDATE statement in action. Effectively updating existing data in a database is required for anyone using SQL; data is only useful if it is kept up-to-date and relevant. In this article, we’ll examine the syntax of the UPDATE statement in great detail. Then we’ll dive into detailed step-by-step examples that will drive home the rules, potential uses, and limitations associated with the SQL UPDATE statement. Read more 4 Aug 2021 Andrew Bone Use SQL on a Movie Database to Decide What to Watch We’ll demonstrate how to use SQL to parse large datasets and gain valuable insights, in this case, to help you choose what movie to watch next using an IMDb dataset. In this article, we’ll be downloading a dataset directory from IMDb. Not sure what to watch tonight? Are you browsing Netflix endlessly? Decide what to watch using the power of SQL! We’ll be loading an existing movie IMDb dataset into SQL. Read more 13 Jul 2021 Andrew Bone What Is the SQL GROUPING SETS Clause, and How Do You Use it? GROUPING SETS are groups, or sets, of columns by which rows can be grouped together. Instead of writing multiple queries and combining the results with a UNION, you can simply use GROUPING SETS. GROUPING SETS in SQL can be considered an extension of the GROUP BY clause. It allows you to define multiple grouping sets in the same query. Let’s look at its syntax and how it can be equivalent to a GROUP BY with multiple UNION ALL clauses. Read more 8 Jul 2021 Andrew Bone What Is the INSERT Statement in SQL? The INSERT statement in SQL is used to add new data to your database. This article will explain how to use it and show you practical examples along the way. When you learn SQL, you focus on getting data out of a database, working mostly with SELECT. In SQL, there are also statements that let you modify data in a database. The first one is the INSERT statement: it adds data to a table. Read more 4 Jun 2021 Andrew Bone How the Division Operator Works in SQL The division operator in SQL is used to divide one expression or number by another. This article will show you exactly how to use it and common mistakes to avoid along the way. The best way to practice SQL is our interactive SQL Practice track. It contains over 600 hands-on exercises that conver varios SQL topics, from simple one-table queries, through JOINs, to complex topics like subqueries. It lets you train your SQL skills on real business examples. Read more «« « 1 2 » »»