Amazon Redshift database supports the below Arithmetic functions: ABS FLOOR CEIL ROUND TRUNC ABS function returns the absolute value of
Continue readingPostgreSQL – DISTINCT ON clause
In Postgres database, you can use DISTINCT ON to select one row per group. Consider the below employee table; where
Continue readingHow to call a function in Redshift database
In Redshift database, functions are called from within a select statement as shown below: SELECT function_name(function_arg1, function_arg2,…); Example: Below is
Continue readingLEFT and RIGHT functions in Redshift database
LEFT function and RIGHT function are string functions that are used to extract the left most or right most substring
Continue readingPOSITION function in Redshift database
In Redshift database, POSITION function is a string function that is used to determine the position of occurrence of a
Continue readingRedshift – RANK Vs DENSE_RANK Window functions
Both RANK and DENSE_RANK are window functions that operate on a partition (or window) of a result set. RANK function
Continue readingEXCEPT operator in Redshift Database
EXCEPT operator is used to compare the result sets of 2 queries . It returns rows from first query that
Continue readingAdding Comments to Tables and Columns in Redshift database
You can add comments on below Redshift database objects: Database Table Columns Constraint View Syntax: COMMENT ON TABLE table_name IS
Continue readingHow to execute a stored procedure in Redshift database
You can use CALL command to execute a stored procedure in Amazon Redshift database. Syntax: CALL proc_name(arg1,arg2,…);
Continue readingHow to append data into Redshift table
In Redshift, you can move data from a source table to a target table by using ‘ALTER TABLE APPEND’. Syntax:
Continue reading