Professional Documents
Culture Documents
ALTER TABLE statement allows to add new column in a table using ADD COLUMN clause.
The ALTER statement is used to modify columns. With ALTER, you can add columns, remove
them, or even modify them.
AS is a keyword in SQL that allows you to rename a column or table using an alias.
DISTINCT is used to return unique values in the output. It filters out all duplicate values in specified
column(s).
WHERE clause is used to restrict query result and obtain desired information. It basically filters out
result.
LIKE clause is used to compare similar values. It is a special operator used with WHERE clause to
search for a specific pattern in a column. Below two wildcards are used:
_ Single value.
% Multiple values
It is not possible to test for NULL values with comparison operators like = and !=.
Instead, we will have to use operators 1.) IS NULL 2.) IS NOT NULL.
BETWEEN operator is used with WHERE clause to filter the result set within a certain range.
In this statement, BETWEEN filters the result set to only include movies with names that
begin with the letter ‘A’ up to, but not including ones that begin with ‘J’.
AND operator is used to combine multiple conditions. It displays results when all conditions are met.
OR operator is used to combine multiple conditions. It displays results when any of condition is met.
MAX() and MIN() returns highest and lowest values in column, respectively.
GROUP BY() clause is used with aggregate functions to arrange identical data into groups.
HAVING() clause is used with aggregate functions. It is used to filter which groups to include and
which groups to exclude.
LEFT JOIN
When the primary key for one table appears in a different table, it is called a foreign
key.
CROSS JOIN is used to combine all rows of one table with all rows of another table.
Requirement is that both tables should have same number of columns and same data type.
WITH clause is used to combine the result of one table with other table.
WITH allows us to define one or more temporary tables that can be used in the final
query.
https://www.scribbr.com/methodology/sampling-methods/
https://www.analyticsvidhya.com/blog/2016/07/deeper-regression-analysis-assumptions-plots-
solutions/
Importing libraries in Python
Pandas DataFrame dropna() Function is used to drop null values.
Tweepy python library is used for retrieving tweets.
Program for Square root of a number in python.
Windows Functions:
Partition By() Function: We can actually go and group records and then apply row number function
on it.
RANK() – For repetitive data RANK() function uses same unique number. It skips continuous
numbers.
Data set
Select E_name from Emp where Salary = (select max(Salary) from Emp);
Inner Join
Left Join
Right Join
Full Join
https://learnsql.com/blog/common-sql-job-interview-questions/
Power BI - https://www.tutorialspoint.com/power_bi/dax_basics_in_power_bi.htm
Calculated Column
Calculated Measure