Skip to content

Muskantak1098/SQL

Repository files navigation

This repository contains SQL queries organized by topic.
Each file focuses on a specific SQL concept, making it easy to study and practice.


Topics

  • Common Table Expression.sql
  • basic_functions.sql – Basic SQL functions
  • group by and having.sql – Using GROUP BY with HAVING clause
  • joins.sql – Different types of joins
  • self join.sql – Self join examples
  • subquery.sql – Subquery usage
  • union.sql – Combining results with UNION
  • window functions.sql – Window functions examples
  • address_foreign key.sql – Foreign key constraints
  • case statement.sql – CASE statements
  • index.sql – Index creation and usage
  • rollback.sql
  • stored procedure.sql – Stored procedures
  • triggers.sql – Database triggers
  • view.sql – Creating and using views

Example Queries

-- Example from basic_functions.sql
SELECT UPPER(name), LENGTH(name) FROM users;

-- Example from union.sql
SELECT name FROM table1
UNION
SELECT name FROM table2;

-- Example from rollback.sql
SET AUTOCOMMIT= 0;
COMMIT;
UPDATE;
ROLLBACK;
SET AUTOCOMMIT= 1; (BY DEFAULT IN MYSQL)

About

learning git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published