Teradata – SubQueries
A subquery returns records from one table based on the values from another table. It is a SELECT query within another query. The SELECT query called as inner query is…
A subquery returns records from one table based on the values from another table. It is a SELECT query within another query. The SELECT query called as inner query is…
JOIN is a clause that is used for combining specific fields from two tables by using values common to each one. It is used to combine records from two or…
Join is used to combine records from more than one table. Tables are joined based on the common columns/values from these tables. There are different types of Joins available. Inner…
CQL provides the facility of creating and using user-defined data types. You can create a data type to handle multiple fields. This chapter explains how to create, alter, and delete…
Primary index is used to specify where the data resides in Teradata. It is used to specify which AMP gets the data row. Each table in Teradata is required to…
This chapter explains the CASE and COALESCE functions of Teradata. CASE Expression CASE expression evaluates each row against a condition or WHEN clause and returns the result of the first…
Teradata supports common aggregate functions. They can be used with the SELECT statement. COUNT − Counts the rowsSUM − Sums up the values of the specified column(s)MAX − Returns the large value of…
CQL provides the facility of using Collection data types. Using these Collection types, you can store multiple values in a single variable. This chapter explains how to use Collections in…
Teradata provides built-in functions which are extensions to SQL. Following are the common built-in functions. FunctionResultSELECT DATE;Date--------16/01/01SELECT CURRENT_DATE;Date--------16/01/01SELECT TIME;Time--------04:50:29SELECT CURRENT_TIME;Time--------04:50:29SELECT CURRENT_TIMESTAMP;Current TimeStamp(6)--------------------------------2016-01-01 04:51:06.990000+00:00SELECT DATABASE;Database------------------------------TDUSER
In this section we will explains the details of GROUP BY clause in a SELECT statement. The GROUP BY clause is used to group all the records in a result…