Category: SQL TUTORIAL
METHOD-1: The below query will give a number of rows for the required tables but these are not accurate until we ANALYZE(gather stats) the tables. So we can not …
Lets take a look at differences between INTERVAL and ADD_MONTHS() in Teradata. This post mainly focused on where to use ADD_MONTHS() over INTERVAL function in Teradata. INTERVAL is a …
RANK Function: RANK function returns the rank of a value in a group of values. It is similar to DENSE_RANK function. The rank function can cause non-consecutive rankings if …
Indexes are special lookup tables that the database search engine can use to speed up data retrieval. To simply put, an index is a pointer to data in a …
STEP-1: Place the CSV or any delimited file in the Oracle server (Ex: stud_course.csv). For the sake of example, assume this file has 3 columns i.e. ID, Name, and …
PROBLEM STATEMENT: Pivot the ‘Occupation’ column in OCCUPATIONS table so that each ‘Name’ is sorted alphabetically and displayed underneath its corresponding Occupation. The output column headers should be Doctor, …
PROBLEM STATEMENT: We define an employee’s total earnings to be their monthly salary*months worked, and the maximum total earnings to be the maximum total earnings for any employee in …
PROBLEM STATEMENT: You are given a table, BTREE, containing two columns: Value and Parent, where ‘Value’ represents the value of a node in Binary Tree, and ‘Parent’ is the …