Skip to content

Merve1503/SQL-Practice-Exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SQL Practice Exercises

This repository contains a collection of SQL practice exercises focused on various aspects of database management. These exercises cover a wide range of SQL commands, including queries, updates, insertions, and deletions. The exercises are designed to improve SQL skills and provide practical examples of common database operations.

📁 Project Structure

  • sql_practices.sql: This file contains all the SQL commands used during the practice sessions, including exercises on querying data, filtering results, updating records, and more.

🛠️ SQL Topics Covered

Basic SQL Queries

  • Retrieve all records: Selecting all records from the kitaplar table.
  • Select specific columns: Selecting specific columns from the yazarlar table.

Filtering Data

  • Filter by specific values: Using WHERE to filter records based on specific criteria (e.g., finding authors named "Orhan").
  • Using DISTINCT: Listing unique author names.
  • Pattern matching with LIKE: Finding authors whose names start with certain letters.

Logical Operators

  • Using AND, OR: Combining multiple conditions to filter data, such as finding books published in a specific year and priced at a certain amount.

Sorting and Limiting Results

  • Order by specific columns: Sorting results based on price, page count, or author names.
  • Limit results: Retrieving the top N records from the table.

Aggregate Functions

  • Find the youngest/oldest author: Using MIN and MAX to find extreme values.
  • Calculate totals: Using functions like SUM, AVG for aggregation.

Inserting and Updating Data

  • Insert new records: Adding new authors to the yazarlar table.
  • Bulk insertions: Inserting multiple records in a single query.
  • Update specific fields: Updating hints in the demo table based on certain conditions.

Deleting Data

  • Delete specific records: Removing records based on their ID or other criteria.

🚀 Getting Started

Prerequisites

To run the SQL scripts in this repository, you will need:

  • SQLite: Download and install SQLite from here.
  • Alternatively, you can use SQLite Online to run the scripts directly in your browser.

📝 Notes

These exercises are intended for educational purposes and to enhance your SQL skills. The SQL commands are written in a way that they can be run in sequence without conflicts, making them ideal for step-by-step practice.

📄 License

This project is open-source and available under the MIT License.

📧 Contact

If you have any questions or feedback, please feel free to contact me at mervekartal07@gmail.com.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published