SQL Tutorials for Citizen Data Scientists

Learn to Code SQL Example – SQL | SELECT TOP Clause

Hits: 3 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | SELECT TOP Clause SELECT TOP clause is used to fetch limited number of rows from a database. This clause is very useful while dealing with large databases. Basic Syntax: SELECT TOP value column1,column2 FROM table_name; value: number of rows to return …

Learn to Code SQL Example – SQL | ORDER BY

Hits: 7 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | ORDER BY The ORDER BY statement in sql is used to sort the fetched data in either ascending or descending according to one or more columns. By default ORDER BY sorts the data in ascending order. We can use the keyword DESC …

Learn to Code SQL Example – SQL | Aliases

Hits: 5 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | Aliases Aliases are the temporary names given to table or column for the purpose of a particular SQL query. It is used when name of column or table is used other than their original names, but the modified name is only …

Learn to Code SQL Example – SQL | Intersect and Except clause

Hits: 3 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | Intersect & Except clause 1. INTERSECT clause : As the name suggests, the intersect clause is used to provide the result of the intersection of two select statements. This implies the result contains all the rows which are common to both the …

Learn to Code SQL Example – SQL | Union Clause

Hits: 5 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | Union Clause The Union Clause is used to combine two separate select statements and produce the result set as a union of both the select statements. NOTE: The fields to be used in both the select statements must be in same …

Learn to Code SQL Example – SQL | Wildcard operators

Hits: 6 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | Wildcard operators In the above mentioned article WHERE Clause is discussed in which LIKE operator is also explained, where you must have encountered the word wildcards now lets get deeper into Wildcards. Wildcard operators are used with LIKE operator, there are …

Learn to Code SQL Example – SQL | GROUP BY

Hits: 5 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | GROUP BY The GROUP BY Statement in SQL is used to arrange identical data into groups with the help of some functions. i.e if a particular column has same values in different rows then it will arrange these rows in a …

Learn to Code SQL Example – SQL | Arithmetic Operators

Hits: 2 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | Arithmetic Operators Arithmetic Operators are: + [Addition] – [Subtraction] / [Division] * [Multiplication] % [Modulus] Addition (+) : It is used to perform addition operation on the data items, items include either single column or multiple columns. Implementation: SELECT employee_id, employee_name, salary, salary + …

Learn to Code SQL Example – SQL | ALL and ANY

Hits: 5 (SQL Example for Citizen Data Scientist & Business Analyst) SQL | ALL and ANY ALL & ANY are logical operators in SQL. They return boolean value as a result. ALL ALL operator is used to select all tuples of SELECT STATEMENT. It is also used to compare a value to every value in another …

Learn to Code SQL Example – SQL | WITH clause

Hits: 16 (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 …

Beginners Guide to SQL – SQL Functions

Hits: 22 (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 …