<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sujanparab on Medium]]></title>
        <description><![CDATA[Stories by Sujanparab on Medium]]></description>
        <link>https://medium.com/@sujanparab12?source=rss-e9f242e11600------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*z7OQynqrzddZGk59YK_8rQ.jpeg</url>
            <title>Stories by Sujanparab on Medium</title>
            <link>https://medium.com/@sujanparab12?source=rss-e9f242e11600------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 11:54:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sujanparab12/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[BASICS OF GIT — DISTRIBUTED VERSION CONTROL SYSTEM]]></title>
            <link>https://medium.com/@sujanparab12/basics-of-git-distributed-version-control-system-ae120f824efe?source=rss-e9f242e11600------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae120f824efe</guid>
            <dc:creator><![CDATA[Sujanparab]]></dc:creator>
            <pubDate>Thu, 21 Dec 2023 04:50:07 GMT</pubDate>
            <atom:updated>2023-12-21T04:50:07.448Z</atom:updated>
            <content:encoded><![CDATA[<h3>BASICS OF GIT — DISTRIBUTED VERSION CONTROL SYSTEM</h3><h3><strong>1: WHAT IS GIT?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*vqKYLIMeZOTtv5F8p6TfQA.jpeg" /><figcaption>GIT</figcaption></figure><p>Git is a distributed version control system (VCS) for tracking changes in source code during software development. It is designed to handle everything from small to very large projects with speed and efficiency.Git was created by Linus Torvalds in 2005 to manage the development of the Linux kernel.</p><p>Git is a distributed VCS, which means that it does not require a central server. Instead, each developer has a complete copy of the project history on their own machine.</p><h3>2: Why is version control important in software development?</h3><p>Version control is an essential tool for software development, providing a foundation for effective collaboration, code management, and quality assurance. Version control systems like Git meticulously record every change made to the code base.</p><h3><strong>3: How do you initialize a new Git repository?</strong></h3><p>Initializing a new Git repository is a straightforward process that involves using the git <strong>init</strong> command. This command creates a hidden directory named<strong>.git</strong> within the current working directory, which will store all the necessary metadata for tracking changes to your project’s files.</p><h3>4: What is branch in GIT?</h3><p>In Git, a branch is a lightweight movable pointer to a commit. It represents an independent line of development within a Git repository. When you create a branch, you essentially create a new set of code changes that is separate from the main codebase. This allows you to work on new features, bug fixes, or experiments without affecting the main code until you are ready to merge your changes.</p><h3>5: What are the different type of git Commands?</h3><h4>git init.</h4><p>The command git init is used to create an empty Git repository.</p><h4>git add.</h4><p>Add command is used after checking the status of the files, to add those files to the staging area.</p><h4>git commit.</h4><p>The commit command makes sure that the changes are saved to the local repository.</p><h4>git config</h4><p>The git config command is used initially to configure the user.name and user.email.</p><h4>git branch</h4><p>The git branch command is used to determine what branch the local repository is on.</p><h4>git checkout</h4><p>The git checkout command is used to switch branches, whenever the work is to be started on a different branch.</p><h4>git merge</h4><p>The <a href="https://www.simplilearn.com/tutorials/git-tutorial/merge-conflicts-in-git">g</a>it merge command is used to integrate the branches together. The command combines the changes from one branch to another branch.</p><h4>git remote</h4><p>The git remote command is used to create, view, and delete connections to other repositories.</p><h4>git clone</h4><p>The git clone command is used to create a local working copy of an existing remote repository.</p><h4>git pull</h4><p>The git pull command is used to fetch and merge changes from the remote repository to the local repository.</p><h4>git push</h4><p>The command git push is used to transfer the commits or pushing the content from the local repository to the remote repository.</p><h4>git fetch</h4><p>The git fetch command is used to retrieve changes from a remote repository without merging them into your local branch.</p><h3>6. What is Git rebase?</h3><p>Git rebase is a Git command used to rewrite the commit history by moving or combining a sequence of commits to a new base commit. Instead of merging changes from one branch into another, as with git merge, git rebase integrates changes by placing them on top of the destination branch. It results in a linear, cleaner commit history.</p><h3>7. Explain the purpose of Git tags?</h3><p>Git tags are used to mark specific points in Git history as being important. They serve as references to specific commits, allowing you to easily identify and reference those commits with a meaningful label. Tags are typically used to indicate versions, releases, or other significant milestones in a project’s development. Here are the key purposes of Git tags.</p><h3>8. What is Git stash?</h3><p>git stash is a Git command that allows you to save changes in your working directory that are not ready to be committed yet. Stashing is useful when you need to switch to a different branch, but you don&#39;t want to commit your changes or if you want to temporarily set aside your modifications and revert to the last commit state.</p><h3>9. what is the Git merge?</h3><p>git merge and git rebase are both Git commands used to integrate changes from one branch into another, but they do so in different ways. Here&#39;s an overview of the key differences between git merge and git rebase:</p><h3>10. What is Git Rebase?</h3><p>Rebasing in Git is a process of integrating a series of commits on top of another base tip. It takes all the commits of a branch and appends them to the commits of a new branch.</p><h3>11. Explain the concept of Git hooks?</h3><p>Git hooks are scripts that Git executes before or after certain events in the Git workflow. These scripts allow you to customize and automate actions based on different Git events, such as committing, pushing, merging, and more. Git hooks reside in the.git/hooks directory of your Git repository, and they are not shared between repositories.</p><h3>12. What is Git bisect?</h3><p>git bisect is a Git command that helps you perform a binary search through your commit history to identify the commit that introduced a bug or regression. It is a powerful tool for pinpointing the commit where a particular issue was introduced or where a certain behavior started occurring.</p><h3>13. Explain the purpose of the Git index.?</h3><p>The Git index, also known as the staging area.it plays a crucial role in the Git workflow. It serves as an intermediate area between your working directory and the repository. The primary purpose of the Git index is to prepare and organize changes before they are committed to the repository.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae120f824efe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CONSTRAINTS IN SQL]]></title>
            <link>https://medium.com/@sujanparab12/constraints-in-sql-3095062de7d1?source=rss-e9f242e11600------2</link>
            <guid isPermaLink="false">https://medium.com/p/3095062de7d1</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Sujanparab]]></dc:creator>
            <pubDate>Mon, 22 May 2023 10:28:03 GMT</pubDate>
            <atom:updated>2023-05-22T10:28:03.883Z</atom:updated>
            <content:encoded><![CDATA[<p>CONSTRAINTS IN SQL</p><p>In SQL, constraints are used to define rules and restrictions on the data stored in database tables. They ensure data integrity and help maintain consistency and accuracy… .</p><p>Primary Key Constraint: A primary key constraint is used to uniquely identify each record in a table. It ensures that the column or a combination of columns defined as the primary key has a unique value for each row. By default, primary key columns are not null… ..</p><p>Unique Constraint: A unique constraint ensures that the values in a collum are unique across the table. Unlike the primary key constraint, unique constraints allow null values.</p><p>Foreign Key Constraint: A foreign key constraint establishes a relationship between two tables. It ensures that the values in a column (foreign key) in one table correspond to the values in a primary key column (referenced key) in another table. It helps maintain referential integrity.</p><p>Check Constraint: A check constraint allows you to define a condition that must be satisfied for the data in a column. It ensures that only valid data is inserted or updated in the table. For example, you can use a check constraint to ensure that the age column contains values greater than zero.</p><p>Not Null Constraint: A not null constraint specifies that a column cannot contain null values. It ensures that a value must be provided for the column when inserting or updating data.</p><p>Default Constraint: A default constraint is used to provide a default value for a column if no explicit value is specified during an insert operation. It ensures that a default value is used when inserting data if no value is provided.</p><p>These are the most commonly used constraints in SQL, but different database management systems may provide additional types of constraints or variations in their implementation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3095062de7d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GROUP BY CLAUSE IN SQL]]></title>
            <link>https://medium.com/@sujanparab12/group-by-clause-in-sql-5b54acfab484?source=rss-e9f242e11600------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b54acfab484</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Sujanparab]]></dc:creator>
            <pubDate>Thu, 11 May 2023 11:25:59 GMT</pubDate>
            <atom:updated>2023-05-11T11:25:59.676Z</atom:updated>
            <content:encoded><![CDATA[<p>GROUP BY CLAUSE IN SQL</p><p>SQL is a powerful tool for managing and analyzing data, and one of its most important features is the GROUP BY clause. The GROUP BY clause allows you to group rows in a table based on one or more columns, and then apply aggregate functions to each group. This can be incredibly useful for summarizing data, generating reports, and gaining insights into patterns and trends.</p><p>The basic syntax for the GROUP BY clause is as follows:</p><p>SELECT column1, column2, ..., aggregate_function(column_name)<br>FROM table_name<br>WHERE condition<br>GROUP BY column1, column2, ...;<br>In this example, column1, column2,</p><p>and so on are the columns you want to group by, and aggregate_function is the function you want to apply to each group. The condition is an optional filter that restricts the rows included in the query.</p><p>Let&#39;s take a closer look at how the GROUP BY clause works in practice. Consider a table of customer orders that includes the following columns:</p><p>order_id, customer_id, product_name, quantity, and price.</p><p>To calculate the total revenue by customer, we could use the following SQL query:<br>SELECT customer_id, SUM(quantity * price) AS total_revenue<br>FROM orders<br>GROUP BY customer_id;</p><p>In this example, we’re grouping the rows by customer_id and using the SUM function to calculate the total revenue for each customer. We’re also using the AS keyword to give the output column a more meaningful name.</p><p>We can also use the GROUP BY clause to group data by multiple columns. For example, to calculate the total revenue by customer and product, we could use the following SQL query:</p><p>SELECT customer_id, product_name, SUM(quantity * price) AS total_revenue<br>FROM orders<br>GROUP BY customer_id, product_name;<br>In this case, we’re grouping the rows by both customer_id and product_name, and using the SUM function to calculate the total revenue for each group.</p><p>The GROUP BY clause can also be used with other aggregate functions, such as COUNT, AVG, MAX, and MIN, to generate additional insights into the data. For example, we might use the following SQL query to calculate the average order value by customer:</p><p>SELECT customer_id, AVG(quantity * price) AS avg_order_value<br>FROM orders<br>GROUP BY customer_id;<br>In this case, we’re using the AVG function to calculate the average order value for each customer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b54acfab484" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AGGREGATE FUNCTIONS IN SQL]]></title>
            <link>https://medium.com/@sujanparab12/aggregate-functions-in-sql-6d75f6b1dc9c?source=rss-e9f242e11600------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d75f6b1dc9c</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Sujanparab]]></dc:creator>
            <pubDate>Thu, 11 May 2023 10:34:54 GMT</pubDate>
            <atom:updated>2023-05-11T10:34:54.628Z</atom:updated>
            <content:encoded><![CDATA[<p>AGGREGATE FUNCTIONS IN SQL</p><p>Aggregate functions are used in databases to perform calculations on groups of data rather than individual rows. These functions take a set of values as input and return a single value as output. Some common aggregate functions include:</p><p>SUM: Calculates the sum of all values in a column.</p><p>AVG: Calculates the average of all values in a column.</p><p>COUNT: Counts the number of rows in a table or the number of values in a column.</p><p>MAX: Returns the maximum value in a column.</p><p>MIN: Returns the minimum value in a column.</p><p>Aggregate functions are often used with the GROUP BY clause in SQL to group data by a specific column or set of columns, and then perform calculations on each group. For example, you might use the following SQL query to calculate the total sales by region:</p><p>SELECT region, SUM(sales)<br>FROM sales_data<br>GROUP BY region;</p><p>This query would return a table with two columns: region and total sales, where the total sales column shows the sum of sales for each region.</p><p>Aggregate functions can also be used in data visualization tools like Excel or Tableau to create charts and graphs that summarize data in a meaningful way. For example, you might use a bar chart to show the total revenue by product category, or a line chart to show the trend in sales over time.</p><p>Overall, aggregate functions are an important tool for data analysts and database administrators to analyze and summarize data, and can help to uncover valuable insights and trends.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d75f6b1dc9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DATA CONTROL LANGUAGE]]></title>
            <link>https://medium.com/@sujanparab12/data-control-language-e271141d3a2e?source=rss-e9f242e11600------2</link>
            <guid isPermaLink="false">https://medium.com/p/e271141d3a2e</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Sujanparab]]></dc:creator>
            <pubDate>Thu, 11 May 2023 10:21:12 GMT</pubDate>
            <atom:updated>2023-05-11T10:21:12.820Z</atom:updated>
            <content:encoded><![CDATA[<p>DATA CONTROL LANGUAGE</p><p>In SQL, Data Control Language (DCL) commands are used to manage access to the database by controlling permissions and privileges. DCL commands are used to grant or revoke access to database objects such as tables, views, and procedures. In this article, we’ll take a look at some of the most common DCL commands that you’ll need to know.</p><p>GRANT Command<br>The GRANT command is used to give users or roles permission to perform specific actions on database objects. Here&#39;s an example of how to use the GRANT command:</p><p>GRANT SELECT, INSERT, UPDATE, DELETE ON table_name TO user_or_role;</p><p>This command will grant the specified user or role permission to perform the SELECT, INSERT, UPDATE, and DELETE actions on the table called &quot;table_name&quot;. You can also grant permissions on multiple tables at once using this command.</p><p>REVOKE Command<br>The REVOKE command is used to remove permissions from users or roles to perform specific actions on database objects. Here&#39;s an example of how to use the REVOKE command:</p><p>REVOKE SELECT, INSERT, UPDATE, DELETE ON table_name FROM user_or_role;</p><p>This command will revoke the specified user or role&#39;s permission to perform the SELECT, INSERT, UPDATE, and DELETE actions on the table called &quot;table_name&quot;. You can also revoke permissions on multiple tables at once using this command.</p><p>GRANT OPTION Command<br>The GRANT OPTION command is used to allow users or roles to grant permissions to other users or roles. Here&#39;s an example of how to use the GRANT OPTION command:</p><p>GRANT SELECT, INSERT, UPDATE, DELETE ON table_name TO user_or_role WITH GRANT OPTION;</p><p>This command will grant the specified user or role permission to perform the SELECT, INSERT, UPDATE, and DELETE actions on the table called &quot;table_name&quot;, as well as the ability to grant those permissions to other users or roles.</p><p>DENY Command<br>The DENY command is used to explicitly deny a user or role access to a specific database object. Here&#39;s an example of how to use the DENY command:</p><p>DENY SELECT, INSERT, UPDATE, DELETE ON table_name TO user_or_role;</p><p>This command will explicitly deny the specified user or role permission to perform the SELECT, INSERT, UPDATE, and DELETE actions on the table called &quot;table_name&quot;.</p><p>Conclusion<br>These are just a few of the most common DCL commands that you’ll need to know to manage access to a database.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e271141d3a2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TRANSACTION CONTROL LANGUAGE]]></title>
            <link>https://medium.com/@sujanparab12/transaction-control-language-19be75c2e5a7?source=rss-e9f242e11600------2</link>
            <guid isPermaLink="false">https://medium.com/p/19be75c2e5a7</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Sujanparab]]></dc:creator>
            <pubDate>Thu, 11 May 2023 09:54:11 GMT</pubDate>
            <atom:updated>2023-05-11T09:54:11.370Z</atom:updated>
            <content:encoded><![CDATA[<p>TRANSACTION CONTROL LANGUAGE</p><p>In SQL, Transaction Control Language (TCL) commands are used to manage transactions within a database. TCL commands are used to manage transactions by committing or rolling back changes to the database. In this article, we&#39;ll take a look at some of the most common TCL commands that you&#39;ll need to know.</p><p>COMMIT Command<br>The COMMIT command is used to permanently save the changes made to the database. Here&#39;s an example of how to use the COMMIT command:</p><p>COMMIT;</p><p>This command will commit all changes made since the last COMMIT or ROLLBACK command. Once a COMMIT command is executed, the changes made to the database are permanent and cannot be undone.</p><p>ROLLBACK Command<br>The ROLLBACK command is used to undo the changes made to the database since the last COMMIT command. Here&#39;s an example of how to use the ROLLBACK command:</p><p>ROLLBACK;</p><p>This command will undo all changes made since the last COMMIT command. Once a ROLLBACK command is executed, the changes made to the database are discarded and cannot be recovered.</p><p>SAVEPOINT Command<br>The SAVEPOINT command is used to set a savepoint within a transaction. Here&#39;s an example of how to use the SAVEPOINT command:</p><p>SAVEPOINT savepoint_name;</p><p>This command will create a savepoint with the specified name within the current transaction. This allows you to roll back to a specific point within the transaction, rather than rolling back the entire transaction.</p><p>ROLLBACK TO SAVEPOINT Command<br>The ROLLBACK TO SAVEPOINT command is used to undo changes made since a specific savepoint. Here&#39;s an example of how to use the ROLLBACK TO SAVEPOINT command:</p><p>ROLLBACK TO SAVEPOINT savepoint_name;</p><p>This command will undo changes made since the specified savepoint within the current transaction. This allows you to roll back to a specific point within the transaction, rather than rolling back the entire transaction.</p><p>Conclusion<br>These are just a few of the most common TCL commands that you&#39;ll need to know to manage transactions within a database. As you become more familiar with SQL, you&#39;ll learn additional TCL commands that can help you manage and manipulate transactions in even more complex ways. With practice and patience, you&#39;ll soon become an expert at working with TCL commands in SQL.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19be75c2e5a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DATA MANIPULATION LANGUAGE]]></title>
            <link>https://medium.com/@sujanparab12/data-manipulation-language-5b9cf29777f4?source=rss-e9f242e11600------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b9cf29777f4</guid>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[it]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Sujanparab]]></dc:creator>
            <pubDate>Thu, 11 May 2023 09:42:09 GMT</pubDate>
            <atom:updated>2023-05-11T09:47:39.173Z</atom:updated>
            <content:encoded><![CDATA[<p>DATA MANIPULATION LANGUAGE</p><p>In SQL, Data Manipulation Language (DML) commands are used to manage and manipulate data within a database. DML commands are used to insert, update, delete, and query data from tables. In this article, we&#39;ll take a look at some of the most common DML commands that you&#39;ll need to know.</p><p>INSERT Command<br>The INSERT command is used to add new rows of data to a table. Here&#39;s an example of how to insert data into a table:</p><p>INSERT INTO table_name (column1, column2, column3) VALUES (value1, value2, value3);</p><p>This command will insert a new row into the table called &quot;table_name&quot; with the specified values for each column. You can also insert multiple rows of data at once using this command.</p><p>UPDATE Command<br>The UPDATE command is used to modify existing data in a table. Here&#39;s an example of how to update data in a table:</p><p>UPDATE table_name SET column1 = value1, column2 = value2 WHERE condition;</p><p>This command will update the values in the specified columns for all rows that meet the specified condition. You can update multiple columns at once using this command.</p><p>DELETE Command<br>The DELETE command is used to remove rows of data from a table. Here&#39;s an example of how to delete data from a table:</p><p>DELETE FROM table_name WHERE condition;</p><p>This command will delete all rows from the table called &quot;table_name&quot; that meet the specified condition. You can also delete all rows from a table using this command by omitting the WHERE clause.</p><p>SELECT Command<br>The SELECT command is used to retrieve data from one or more tables. Here&#39;s an example of how to select data from a table:</p><p>SELECT column1, column2, ... FROM table_name WHERE condition;</p><p>This command will retrieve the specified columns from the table called &quot;table_name&quot; for all rows that meet the specified condition. You can also retrieve all columns from a table by using the wildcard (*) character.</p><p>Conclusion<br>These are just a few of the most common DML commands that you&#39;ll need to know to manipulate data within a database. As you become more familiar with SQL, you&#39;ll learn additional DML commands that can help you manage and manipulate data in even more complex ways. With practice and patience, you&#39;ll soon become an expert at working with DML commands in SQL.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b9cf29777f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Definition Language]]></title>
            <link>https://medium.com/@sujanparab12/data-definition-language-e779827916bf?source=rss-e9f242e11600------2</link>
            <guid isPermaLink="false">https://medium.com/p/e779827916bf</guid>
            <dc:creator><![CDATA[Sujanparab]]></dc:creator>
            <pubDate>Thu, 11 May 2023 09:38:30 GMT</pubDate>
            <atom:updated>2023-05-11T09:46:47.409Z</atom:updated>
            <content:encoded><![CDATA[<p>DATA DEFINITION LANGUAGE</p><p>In SQL, Data Definition Language (DDL) commands are used to manage the structure of the database. DDL commands are used to create, alter, and delete tables, indexes, and other database objects. In this article, we&#39;ll take a look at some of the most common DDL commands that you&#39;ll need to know.</p><p>CREATE Command<br>The CREATE command is used to create tables, indexes, and other database objects. Here&#39;s an example of how to create a table:</p><p>CREATE TABLE table_name (<br>column1 datatype constraint,<br>column2 datatype constraint,<br>...<br>);</p><p>This command will create a new table called &quot;table_name&quot; with the specified columns and data types. You can also add constraints to the columns, such as primary key or foreign key constraints.</p><p>ALTER Command<br>The ALTER command is used to modify the structure of a table. Here&#39;s an example of how to add a new column to an existing table:</p><p>ALTER TABLE table_name ADD column_name datatype constraint;</p><p>This command will add a new column called &quot;column_name&quot; to the table called &quot;table_name&quot; with the specified data type and constraint.</p><p>DROP Command<br>The DROP command is used to delete tables, indexes, and other database objects. Here&#39;s an example of how to drop a table:</p><p>DROP TABLE table_name;</p><p>This command will delete the table called &quot;table_name&quot; from the database.</p><p>TRUNCATE Command<br>The TRUNCATE command is used to remove all data from a table. Here&#39;s an example of how to truncate a table:</p><p>TRUNCATE TABLE table_name;</p><p>This command will remove all data from the table called &quot;table_name&quot;. The table structure and any constraints will remain intact.</p><p>RENAME Command<br>The RENAME command is used to rename tables, columns, and other database objects. Here&#39;s an example of how to rename a table:</p><p>RENAME TABLE old_table_name TO new_table_name;</p><p>This command will rename the table called &quot;old_table_name&quot; to &quot;new_table_name&quot;.</p><p>Conclusion<br>These are just a few of the most common DDL commands that you&#39;ll need to know to manage the structure of a database. As you become more familiar with SQL, you&#39;ll learn additional DDL commands that can help you manage and manipulate the structure of your database in even more complex ways. With practice and patience, you&#39;ll soon become an expert at working with DDL commands in SQL.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e779827916bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Subqueries in SQL can be classified into two types:]]></title>
            <link>https://medium.com/@sujanparab12/subqueries-in-sql-can-be-classified-into-two-types-8d28df1e92f3?source=rss-e9f242e11600------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d28df1e92f3</guid>
            <dc:creator><![CDATA[Sujanparab]]></dc:creator>
            <pubDate>Thu, 11 May 2023 06:35:19 GMT</pubDate>
            <atom:updated>2023-05-12T14:36:09.270Z</atom:updated>
            <content:encoded><![CDATA[<p>Subqueries in SQL can be classified into two types:</p><p>correlated and non-correlated subqueries.</p><p>1. Non-correlated Subquery:<br> - A non-correlated subquery is a subquery that can be executed independently of the outer query.<br> - It can be evaluated first, and its result can be used in the outer query.<br> - The result of a non-correlated subquery is a temporary result set that is used in the outer query.<br> - The subquery does not refer to any column from the outer query.<br> - Non-correlated subqueries are generally executed only once and their result is reused in the outer query.</p><p>Example:<br>```sql<br>SELECT * <br>FROM customers<br>WHERE age &gt; (SELECT AVG(age) FROM customers);<br>```<br>In this example, the subquery `(SELECT AVG(age) FROM customers)` is a non-correlated subquery because it can be executed independently of the outer query. It calculates the average age of all customers, and the result is used as a condition in the outer query to retrieve customers with an age greater than the average.</p><p>2. Correlated Subquery:<br> - A correlated subquery is a subquery that depends on the outer query for its execution.<br> - It is executed for each row of the outer query.<br> - The result of a correlated subquery is dependent on the current row being processed by the outer query.<br> - The subquery refers to one or more columns from the outer query.<br> - Correlated subqueries are generally executed repeatedly for each row of the outer query.</p><p>Example:<br>```sql<br>SELECT *<br>FROM orders o<br>WHERE quantity &gt; (SELECT AVG(quantity) FROM orders WHERE customer_id = o.customer_id);<br>```<br>In this example, the subquery `(SELECT AVG(quantity) FROM orders WHERE customer_id = o.customer_id)` is a correlated subquery. It calculates the average quantity of orders for each customer, and the result is used as a condition in the outer query to retrieve orders with a quantity greater than the average quantity for each respective customer.</p><p>In summary, non-correlated subqueries can be executed independently of the outer query and their result is used in the outer query, while correlated subqueries depend on the outer query and are executed repeatedly for each row of the outer query.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d28df1e92f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[—  —  —  —LAMBA FUNCTION  —  —  —  —]]></title>
            <link>https://medium.com/@sujanparab12/lamba-function-abac1c6e60a3?source=rss-e9f242e11600------2</link>
            <guid isPermaLink="false">https://medium.com/p/abac1c6e60a3</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Sujanparab]]></dc:creator>
            <pubDate>Thu, 11 May 2023 06:31:59 GMT</pubDate>
            <atom:updated>2023-05-11T09:45:54.409Z</atom:updated>
            <content:encoded><![CDATA[<p>— — — —LAMBA FUNCTION — — — —</p><p>Lambda functions, also known as anonymous functions, and user-defined functions are both used to define and execute blocks of code. However, they have some key differences:</p><p>1. Syntax: Lambda functions are defined using a compact syntax and are typically one-liners, while user-defined functions have a more extensive syntax and can span multiple lines.</p><p>2. Name: Lambda functions do not have a name and are anonymous. They are primarily used for one-time or simple tasks. User-defined functions, on the other hand, have a name and can be called multiple times throughout a program.</p><p>3. Definition: Lambda functions are defined using the `lambda` keyword, followed by a list of arguments and an expression. For example: `lambda x: x**2`. User-defined functions, on the other hand, are defined using the `def` keyword, followed by the function name, a list of arguments in parentheses, and a block of code. For example: `def square(x): return x**2`.</p><p>4. Scope: Lambda functions are limited to their expression and have access only to their arguments and global variables. They cannot contain statements such as `if` or `for`. User-defined functions have a wider scope and can include any valid Python code, including control statements, loops, and more complex operations.</p><p>5. Reusability: Lambda functions are typically used for small, one-time tasks and are not designed for reuse. User-defined functions, on the other hand, are created with the intention of being reusable throughout a program. They can be called multiple times from different parts of the code.</p><p>6. Readability: User-defined functions can have meaningful names and include comments, making them easier to understand and maintain. Lambda functions lack a name and are usually employed for simple operations, making them less readable when used for complex tasks.</p><p>In summary, lambda functions are anonymous, one-liner functions primarily used for simple tasks, while user-defined functions have names, can be multi-line, and are designed for reusability and more complex operations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abac1c6e60a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>