Skip to content

SQL_Notes: Learn SQL concepts through practical application! This repository contains concise notes on key SQL concepts, commands, and techniques, illustrated by solutions to LeetCode SQL challenges and exercises from other sources. Sharpen your SQL skills by understanding the why behind the code!

Notifications You must be signed in to change notification settings

Danitilahun/SQL_Notes

Repository files navigation

SQL Notes and Problem Solutions

This repository, SQL_Notes, is a well-organized collection of SQL problem solutions that primarily includes LeetCode SQL challenges alongside problems from other sources. It aims to be more than just a collection of answers; it also provides explanations and reminders of key SQL concepts, useful for both learning and refreshing your knowledge.

Key SQL Concepts Covered

This repository will cover many important concepts, including:

  • Basic SQL Syntax: SELECT, FROM, WHERE, ORDER BY, GROUP BY, HAVING
  • Filtering Data: WHERE clause, comparison operators, logical operators (AND, OR, NOT), IN, BETWEEN, LIKE
  • Joining Tables: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN, CROSS JOIN, self-joins
  • Aggregate Functions: COUNT, SUM, AVG, MIN, MAX
  • Grouping Data: GROUP BY clause, HAVING clause
  • Subqueries: Using subqueries in SELECT, FROM, WHERE, and HAVING clauses
  • Window Functions: OVER, PARTITION BY, ORDER BY within PARTITION, RANK, DENSE_RANK, ROW_NUMBER
  • Common Table Expressions (CTEs): WITH clause
  • Data Manipulation: INSERT, UPDATE, DELETE
  • Data Definition: CREATE TABLE, ALTER TABLE, DROP TABLE, data types, constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL)
  • Indexes: Creating and using indexes to improve query performance
  • Transactions: ACID properties, BEGIN TRANSACTION, COMMIT, ROLLBACK
  • String Functions: SUBSTRING, CONCAT, LENGTH, TRIM, UPPER, LOWER
  • Date and Time Functions: Functions specific to your database system (e.g., MySQL's DATE(), YEAR(), MONTH(), DAY(), DATE_FORMAT(); PostgreSQL's date_part(), to_char())
  • Conditional Logic: CASE statements
  • NULL Handling: IS NULL, IS NOT NULL, COALESCE
  • Set Operations: UNION, UNION ALL, INTERSECT, EXCEPT (or MINUS, depending on the database)

About

SQL_Notes: Learn SQL concepts through practical application! This repository contains concise notes on key SQL concepts, commands, and techniques, illustrated by solutions to LeetCode SQL challenges and exercises from other sources. Sharpen your SQL skills by understanding the why behind the code!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published