From 044561a1b0fee26396a9f4a05c27d9e5e18f18c1 Mon Sep 17 00:00:00 2001 From: Bipin Kumar Date: Mon, 30 Dec 2024 23:02:40 +0530 Subject: [PATCH 1/3] JAVA-40934 sql-queries-5 module splitted and new submodule created --- sql-queries-5/README.md | 7 +------ sql-queries-9/README.md | 4 ++++ .../delete-column-from-table/delete-column-from-table.sql | 0 .../delete-columns-from-table-mssql.sql | 0 .../delete-columns-from-table-mysql.sql | 0 .../delete-columns-from-table-pg.sql | 0 .../correlated_subquery.sql | 0 .../difference_between_CTE_and_Subquery/cte_use_case.sql | 0 .../multi_row_subquery.sql | 0 .../recursive_cte_query.sql | 0 .../scalar_subquery.sql | 0 .../subquery_use_case.sql | 0 .../sql-over-clause/over-clause-with-group-by.sql | 0 .../sql-over-clause/over-clause-with-order-by.sql | 0 .../sql-over-clause/over-clause-with-partition-by.sql | 0 .../sql-over-clause/over-clause-with-rows.sql | 0 sql-queries-dates/README.md | 1 + .../Basic Date Filtering.sql | 0 .../Handling Time in Date Ranges.sql | 0 .../Selecting Dates Within a Range.sql | 0 .../Selecting Dates Within a Range_2.sql | 0 .../Using Functions for Date Range Selection.sql | 0 .../Using Functions for Date Range Selection_2.sql | 0 .../Working with Different Date Formats.sql | 0 .../Working with Different Date Formats_2.sql | 0 25 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 sql-queries-9/README.md rename {sql-queries-5 => sql-queries-9}/delete-column-from-table/delete-column-from-table.sql (100%) rename {sql-queries-5 => sql-queries-9}/delete-column-from-table/delete-columns-from-table-mssql.sql (100%) rename {sql-queries-5 => sql-queries-9}/delete-column-from-table/delete-columns-from-table-mysql.sql (100%) rename {sql-queries-5 => sql-queries-9}/delete-column-from-table/delete-columns-from-table-pg.sql (100%) rename {sql-queries-5 => sql-queries-9}/difference_between_CTE_and_Subquery/correlated_subquery.sql (100%) rename {sql-queries-5 => sql-queries-9}/difference_between_CTE_and_Subquery/cte_use_case.sql (100%) rename {sql-queries-5 => sql-queries-9}/difference_between_CTE_and_Subquery/multi_row_subquery.sql (100%) rename {sql-queries-5 => sql-queries-9}/difference_between_CTE_and_Subquery/recursive_cte_query.sql (100%) rename {sql-queries-5 => sql-queries-9}/difference_between_CTE_and_Subquery/scalar_subquery.sql (100%) rename {sql-queries-5 => sql-queries-9}/difference_between_CTE_and_Subquery/subquery_use_case.sql (100%) rename {sql-queries-5 => sql-queries-9}/sql-over-clause/over-clause-with-group-by.sql (100%) rename {sql-queries-5 => sql-queries-9}/sql-over-clause/over-clause-with-order-by.sql (100%) rename {sql-queries-5 => sql-queries-9}/sql-over-clause/over-clause-with-partition-by.sql (100%) rename {sql-queries-5 => sql-queries-9}/sql-over-clause/over-clause-with-rows.sql (100%) rename {sql-queries-5 => sql-queries-dates}/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Basic Date Filtering.sql (100%) rename {sql-queries-5 => sql-queries-dates}/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Handling Time in Date Ranges.sql (100%) rename {sql-queries-5 => sql-queries-dates}/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Selecting Dates Within a Range.sql (100%) rename {sql-queries-5 => sql-queries-dates}/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Selecting Dates Within a Range_2.sql (100%) rename {sql-queries-5 => sql-queries-dates}/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Using Functions for Date Range Selection.sql (100%) rename {sql-queries-5 => sql-queries-dates}/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Using Functions for Date Range Selection_2.sql (100%) rename {sql-queries-5 => sql-queries-dates}/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Working with Different Date Formats.sql (100%) rename {sql-queries-5 => sql-queries-dates}/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Working with Different Date Formats_2.sql (100%) diff --git a/sql-queries-5/README.md b/sql-queries-5/README.md index 2f09641a..0a632ad5 100644 --- a/sql-queries-5/README.md +++ b/sql-queries-5/README.md @@ -1,16 +1,11 @@ ### Relevant Articles - - [Best Practices for String Concatenation and Aggregation in SQL](https://www.baeldung.com/sql/string-concatenation-aggregation) - [Updating Data with Joins in SQL Queries](https://www.baeldung.com/sql/updating-data-joins) - [Performing an Insert if Not Exists Operation in SQL](https://www.baeldung.com/sql/insert-if-not-exists-operation) - [Removing the Primary Key in a MySQL Table](https://www.baeldung.com/sql/mysql-delete-primary-key) -- [Difference Between CTE and Subquery](https://www.baeldung.com/sql/cte-vs-subquery) -- [Understanding the SQL OVER() Clause](https://www.baeldung.com/sql/over) -- [Deleting a Column From a Table in SQL](https://www.baeldung.com/sql/delete-column-from-table) - [Understanding the Purpose of Creating a View in a Database](https://www.baeldung.com/sql/database-view-purpose) - [How to Remove Leading Zeros in SQL](https://www.baeldung.com/sql/remove-leading-zeros) -- [Selecting Dates Within a Range Using SQL Queries](https://www.baeldung.com/sql/select-dates-range) - [Difference Between SET autocommit=1 and START TRANSACTION in MySQL](https://www.baeldung.com/sql/mysql-autocommit-one-vs-start-transaction) - [Selecting the Bottom N Rows in SQL Queries](https://www.baeldung.com/sql/select-bottom-n-rows) - [Turning Off Autocommit For a MySQL Client](https://www.baeldung.com/sql/mysql-turn-off-autocommit-mode) -- [How to Split Single Column Values to Multiple Columns in SQL](https://www.baeldung.com/sql/split-single-column-values) +- [How to Split Single Column Values to Multiple Columns in SQL](https://www.baeldung.com/sql/split-single-column-values) \ No newline at end of file diff --git a/sql-queries-9/README.md b/sql-queries-9/README.md new file mode 100644 index 00000000..d0b597a7 --- /dev/null +++ b/sql-queries-9/README.md @@ -0,0 +1,4 @@ +### Relevant Articles +- [Understanding the SQL OVER() Clause](https://www.baeldung.com/sql/over) +- [Difference Between CTE and Subquery](https://www.baeldung.com/sql/cte-vs-subquery) +- [Deleting a Column From a Table in SQL](https://www.baeldung.com/sql/delete-column-from-table) \ No newline at end of file diff --git a/sql-queries-5/delete-column-from-table/delete-column-from-table.sql b/sql-queries-9/delete-column-from-table/delete-column-from-table.sql similarity index 100% rename from sql-queries-5/delete-column-from-table/delete-column-from-table.sql rename to sql-queries-9/delete-column-from-table/delete-column-from-table.sql diff --git a/sql-queries-5/delete-column-from-table/delete-columns-from-table-mssql.sql b/sql-queries-9/delete-column-from-table/delete-columns-from-table-mssql.sql similarity index 100% rename from sql-queries-5/delete-column-from-table/delete-columns-from-table-mssql.sql rename to sql-queries-9/delete-column-from-table/delete-columns-from-table-mssql.sql diff --git a/sql-queries-5/delete-column-from-table/delete-columns-from-table-mysql.sql b/sql-queries-9/delete-column-from-table/delete-columns-from-table-mysql.sql similarity index 100% rename from sql-queries-5/delete-column-from-table/delete-columns-from-table-mysql.sql rename to sql-queries-9/delete-column-from-table/delete-columns-from-table-mysql.sql diff --git a/sql-queries-5/delete-column-from-table/delete-columns-from-table-pg.sql b/sql-queries-9/delete-column-from-table/delete-columns-from-table-pg.sql similarity index 100% rename from sql-queries-5/delete-column-from-table/delete-columns-from-table-pg.sql rename to sql-queries-9/delete-column-from-table/delete-columns-from-table-pg.sql diff --git a/sql-queries-5/difference_between_CTE_and_Subquery/correlated_subquery.sql b/sql-queries-9/difference_between_CTE_and_Subquery/correlated_subquery.sql similarity index 100% rename from sql-queries-5/difference_between_CTE_and_Subquery/correlated_subquery.sql rename to sql-queries-9/difference_between_CTE_and_Subquery/correlated_subquery.sql diff --git a/sql-queries-5/difference_between_CTE_and_Subquery/cte_use_case.sql b/sql-queries-9/difference_between_CTE_and_Subquery/cte_use_case.sql similarity index 100% rename from sql-queries-5/difference_between_CTE_and_Subquery/cte_use_case.sql rename to sql-queries-9/difference_between_CTE_and_Subquery/cte_use_case.sql diff --git a/sql-queries-5/difference_between_CTE_and_Subquery/multi_row_subquery.sql b/sql-queries-9/difference_between_CTE_and_Subquery/multi_row_subquery.sql similarity index 100% rename from sql-queries-5/difference_between_CTE_and_Subquery/multi_row_subquery.sql rename to sql-queries-9/difference_between_CTE_and_Subquery/multi_row_subquery.sql diff --git a/sql-queries-5/difference_between_CTE_and_Subquery/recursive_cte_query.sql b/sql-queries-9/difference_between_CTE_and_Subquery/recursive_cte_query.sql similarity index 100% rename from sql-queries-5/difference_between_CTE_and_Subquery/recursive_cte_query.sql rename to sql-queries-9/difference_between_CTE_and_Subquery/recursive_cte_query.sql diff --git a/sql-queries-5/difference_between_CTE_and_Subquery/scalar_subquery.sql b/sql-queries-9/difference_between_CTE_and_Subquery/scalar_subquery.sql similarity index 100% rename from sql-queries-5/difference_between_CTE_and_Subquery/scalar_subquery.sql rename to sql-queries-9/difference_between_CTE_and_Subquery/scalar_subquery.sql diff --git a/sql-queries-5/difference_between_CTE_and_Subquery/subquery_use_case.sql b/sql-queries-9/difference_between_CTE_and_Subquery/subquery_use_case.sql similarity index 100% rename from sql-queries-5/difference_between_CTE_and_Subquery/subquery_use_case.sql rename to sql-queries-9/difference_between_CTE_and_Subquery/subquery_use_case.sql diff --git a/sql-queries-5/sql-over-clause/over-clause-with-group-by.sql b/sql-queries-9/sql-over-clause/over-clause-with-group-by.sql similarity index 100% rename from sql-queries-5/sql-over-clause/over-clause-with-group-by.sql rename to sql-queries-9/sql-over-clause/over-clause-with-group-by.sql diff --git a/sql-queries-5/sql-over-clause/over-clause-with-order-by.sql b/sql-queries-9/sql-over-clause/over-clause-with-order-by.sql similarity index 100% rename from sql-queries-5/sql-over-clause/over-clause-with-order-by.sql rename to sql-queries-9/sql-over-clause/over-clause-with-order-by.sql diff --git a/sql-queries-5/sql-over-clause/over-clause-with-partition-by.sql b/sql-queries-9/sql-over-clause/over-clause-with-partition-by.sql similarity index 100% rename from sql-queries-5/sql-over-clause/over-clause-with-partition-by.sql rename to sql-queries-9/sql-over-clause/over-clause-with-partition-by.sql diff --git a/sql-queries-5/sql-over-clause/over-clause-with-rows.sql b/sql-queries-9/sql-over-clause/over-clause-with-rows.sql similarity index 100% rename from sql-queries-5/sql-over-clause/over-clause-with-rows.sql rename to sql-queries-9/sql-over-clause/over-clause-with-rows.sql diff --git a/sql-queries-dates/README.md b/sql-queries-dates/README.md index 5f86e764..200aa895 100644 --- a/sql-queries-dates/README.md +++ b/sql-queries-dates/README.md @@ -5,3 +5,4 @@ - [Get Current Timestamp in SQL Server](https://www.baeldung.com/sql/sql-server-current-timestamp) - [Group Query Results by Month and Year in SQL](https://www.baeldung.com/sql/group-by-date-parts) - [How to Get the Day of the Week in SQL](https://www.baeldung.com/sql/day-of-the-week) +- [Selecting Dates Within a Range Using SQL Queries](https://www.baeldung.com/sql/select-dates-range) \ No newline at end of file diff --git a/sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Basic Date Filtering.sql b/sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Basic Date Filtering.sql similarity index 100% rename from sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Basic Date Filtering.sql rename to sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Basic Date Filtering.sql diff --git a/sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Handling Time in Date Ranges.sql b/sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Handling Time in Date Ranges.sql similarity index 100% rename from sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Handling Time in Date Ranges.sql rename to sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Handling Time in Date Ranges.sql diff --git a/sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Selecting Dates Within a Range.sql b/sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Selecting Dates Within a Range.sql similarity index 100% rename from sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Selecting Dates Within a Range.sql rename to sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Selecting Dates Within a Range.sql diff --git a/sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Selecting Dates Within a Range_2.sql b/sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Selecting Dates Within a Range_2.sql similarity index 100% rename from sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Selecting Dates Within a Range_2.sql rename to sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Selecting Dates Within a Range_2.sql diff --git a/sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Using Functions for Date Range Selection.sql b/sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Using Functions for Date Range Selection.sql similarity index 100% rename from sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Using Functions for Date Range Selection.sql rename to sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Using Functions for Date Range Selection.sql diff --git a/sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Using Functions for Date Range Selection_2.sql b/sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Using Functions for Date Range Selection_2.sql similarity index 100% rename from sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Using Functions for Date Range Selection_2.sql rename to sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Using Functions for Date Range Selection_2.sql diff --git a/sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Working with Different Date Formats.sql b/sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Working with Different Date Formats.sql similarity index 100% rename from sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Working with Different Date Formats.sql rename to sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Working with Different Date Formats.sql diff --git a/sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Working with Different Date Formats_2.sql b/sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Working with Different Date Formats_2.sql similarity index 100% rename from sql-queries-5/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Working with Different Date Formats_2.sql rename to sql-queries-dates/Selecting_Dates_Within_a_Range_Using_SQL_Queries/Working with Different Date Formats_2.sql From aac7acd324366b45ea33abc91c207a09cb5e5d3a Mon Sep 17 00:00:00 2001 From: Bipin Kumar Date: Tue, 7 Jan 2025 20:30:45 +0530 Subject: [PATCH 2/3] JAVA-40934 cte-vs-subquery moved to sql-subqueries module --- sql-subqueries/README.md | 2 ++ .../difference_between_CTE_and_Subquery/correlated_subquery.sql | 0 .../difference_between_CTE_and_Subquery/cte_use_case.sql | 0 .../difference_between_CTE_and_Subquery/multi_row_subquery.sql | 0 .../difference_between_CTE_and_Subquery/recursive_cte_query.sql | 0 .../difference_between_CTE_and_Subquery/scalar_subquery.sql | 0 .../difference_between_CTE_and_Subquery/subquery_use_case.sql | 0 7 files changed, 2 insertions(+) create mode 100644 sql-subqueries/README.md rename {sql-queries-9 => sql-subqueries}/difference_between_CTE_and_Subquery/correlated_subquery.sql (100%) rename {sql-queries-9 => sql-subqueries}/difference_between_CTE_and_Subquery/cte_use_case.sql (100%) rename {sql-queries-9 => sql-subqueries}/difference_between_CTE_and_Subquery/multi_row_subquery.sql (100%) rename {sql-queries-9 => sql-subqueries}/difference_between_CTE_and_Subquery/recursive_cte_query.sql (100%) rename {sql-queries-9 => sql-subqueries}/difference_between_CTE_and_Subquery/scalar_subquery.sql (100%) rename {sql-queries-9 => sql-subqueries}/difference_between_CTE_and_Subquery/subquery_use_case.sql (100%) diff --git a/sql-subqueries/README.md b/sql-subqueries/README.md new file mode 100644 index 00000000..195b9d86 --- /dev/null +++ b/sql-subqueries/README.md @@ -0,0 +1,2 @@ +### Relevant Articles +- [Difference Between CTE and Subquery](https://www.baeldung.com/sql/cte-vs-subquery) \ No newline at end of file diff --git a/sql-queries-9/difference_between_CTE_and_Subquery/correlated_subquery.sql b/sql-subqueries/difference_between_CTE_and_Subquery/correlated_subquery.sql similarity index 100% rename from sql-queries-9/difference_between_CTE_and_Subquery/correlated_subquery.sql rename to sql-subqueries/difference_between_CTE_and_Subquery/correlated_subquery.sql diff --git a/sql-queries-9/difference_between_CTE_and_Subquery/cte_use_case.sql b/sql-subqueries/difference_between_CTE_and_Subquery/cte_use_case.sql similarity index 100% rename from sql-queries-9/difference_between_CTE_and_Subquery/cte_use_case.sql rename to sql-subqueries/difference_between_CTE_and_Subquery/cte_use_case.sql diff --git a/sql-queries-9/difference_between_CTE_and_Subquery/multi_row_subquery.sql b/sql-subqueries/difference_between_CTE_and_Subquery/multi_row_subquery.sql similarity index 100% rename from sql-queries-9/difference_between_CTE_and_Subquery/multi_row_subquery.sql rename to sql-subqueries/difference_between_CTE_and_Subquery/multi_row_subquery.sql diff --git a/sql-queries-9/difference_between_CTE_and_Subquery/recursive_cte_query.sql b/sql-subqueries/difference_between_CTE_and_Subquery/recursive_cte_query.sql similarity index 100% rename from sql-queries-9/difference_between_CTE_and_Subquery/recursive_cte_query.sql rename to sql-subqueries/difference_between_CTE_and_Subquery/recursive_cte_query.sql diff --git a/sql-queries-9/difference_between_CTE_and_Subquery/scalar_subquery.sql b/sql-subqueries/difference_between_CTE_and_Subquery/scalar_subquery.sql similarity index 100% rename from sql-queries-9/difference_between_CTE_and_Subquery/scalar_subquery.sql rename to sql-subqueries/difference_between_CTE_and_Subquery/scalar_subquery.sql diff --git a/sql-queries-9/difference_between_CTE_and_Subquery/subquery_use_case.sql b/sql-subqueries/difference_between_CTE_and_Subquery/subquery_use_case.sql similarity index 100% rename from sql-queries-9/difference_between_CTE_and_Subquery/subquery_use_case.sql rename to sql-subqueries/difference_between_CTE_and_Subquery/subquery_use_case.sql From 7a666e3fb82b41ac592b4833e372f204e3049b68 Mon Sep 17 00:00:00 2001 From: Bipin Kumar Date: Tue, 7 Jan 2025 20:34:39 +0530 Subject: [PATCH 3/3] JAVA-40934 Fixed Readme --- sql-queries-9/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sql-queries-9/README.md b/sql-queries-9/README.md index d0b597a7..0ba22165 100644 --- a/sql-queries-9/README.md +++ b/sql-queries-9/README.md @@ -1,4 +1,3 @@ ### Relevant Articles - [Understanding the SQL OVER() Clause](https://www.baeldung.com/sql/over) -- [Difference Between CTE and Subquery](https://www.baeldung.com/sql/cte-vs-subquery) - [Deleting a Column From a Table in SQL](https://www.baeldung.com/sql/delete-column-from-table) \ No newline at end of file