Tag Archives: SQL tutorials

Learn to Code SQL Example – SQL | WITH clause

(SQL Example for Citizen Data Scientist & Business Analyst) SQL | WITH clause The SQL WITH clause was introduced by Oracle in the Oracle 9i release 2 database. The SQL WITH clause allows you to give a sub-query block a name (a process also called sub-query refactoring), which can be referenced in several places within …

Beginners Guide to SQL – SQL Functions

(SQL Tutorials for Citizen Data Scientist) SQL Functions SQL has many built-in functions that enable you to perform calculations on data. SQL Aggregate Functions SQL aggregate functions perform calculation on a set of values and return a single value. The following table summarizes some useful aggregate functions: Function Description AVG() Returns the average of values SUM() …

Beginners Guide to SQL – SQL Subqueries

(SQL Tutorials for Citizen Data Scientist) SQL Subqueries In this tutorial you will learn how to embed a query within another query in SQL. What Is a Subquery? A subquery, also known as a nested query or subselect, is a SELECT query embedded within the WHERE or HAVING clause of another SQL query. The data returned by the subquery is used by …

Beginners Guide to SQL – SQL Temporary Tables

(SQL Tutorials for Citizen Data Scientist) SQL Temporary Tables In this tutorial you will learn how to create temporary tables using SQL. Creating Temporary Tables A temporary table is a table that is visible only to the current session, and is dropped automatically when the session in which it was created is closed. Since temporary tables …

Beginners Guide to SQL – SQL CREATE VIEW Statement

(SQL Tutorials for Citizen Data Scientist) SQL CREATE VIEW Statement In this tutorial you will learn how to create, update, and delete a view using SQL. Creating Views to Simplify Table Access A view is a virtual table whose definition is stored in the database. But, unlike tables, views do not actually contain any data. Instead, it …

Beginners Guide to SQL – SQL HAVING Clause

(SQL Tutorials for Citizen Data Scientist) SQL HAVING Clause In this tutorial you will learn how to filter the groups returned by a GROUP BY clause. Filtering the Groups Based on Condition The HAVING clause is typically used with the GROUP BY clause to specify a filter condition for a group or an aggregate. The HAVING clause can only be used with the SELECT statement. To understand …