Database

Basic Database Concepts

SQL Basics

SELECT * FROM table1 INNER JOIN table2 ON table1.id = table2.id;

Normalization

Database Design

SQL Advanced Queries

Transaction Management

Indexing

Performance Tuning

Database Security

NoSQL Databases

Database Tools

Data Backup and Recovery

Database Administration

SQL Examples

SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees);

SELECT column1, column2, COUNT(*) FROM table_name GROUP BY column1, column2 HAVING COUNT(*) > 1;

SQL Joins and Subqueries

SELECT A.column_name, B.column_name

FROM table_name A, table_name B

WHERE A.common_field = B.common_field;

27. What is a LEFT JOIN?

SELECT A.column_name, B.column_name

FROM table1 A

LEFT JOIN table2 B ON A.common_field = B.common_field;

28. What is a RIGHT JOIN?

SELECT A.column_name, B.column_name

FROM table1 A

RIGHT JOIN table2 B ON A.common_field = B.common_field;

29. What is a FULL OUTER JOIN?

SELECT A.column_name, B.column_name

FROM table1 A

FULL OUTER JOIN table2 B ON A.common_field = B.common_field;

30. What is a SUBQUERY?

SELECT column_name

FROM table_name

WHERE column_name = (SELECT another_column FROM another_table WHERE condition);

SQL Aggregate Functions

SELECT COUNT(column_name) FROM table_name WHERE condition;

32. What is SUM() function?

SELECT SUM(column_name) FROM table_name WHERE condition;

33. What is AVG() function?


SQL Constraints