<?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 akash ghanghav on Medium]]></title>
        <description><![CDATA[Stories by akash ghanghav on Medium]]></description>
        <link>https://medium.com/@ghanghavakash?source=rss-4bab9611f994------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*jGKhps6PGwRa5YUO</url>
            <title>Stories by akash ghanghav on Medium</title>
            <link>https://medium.com/@ghanghavakash?source=rss-4bab9611f994------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 12:21:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ghanghavakash/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[SQL Interview Questions — Functions in SQL Server]]></title>
            <link>https://medium.com/@ghanghavakash/sql-interview-questions-functions-in-sql-server-a11ee4a6161a?source=rss-4bab9611f994------2</link>
            <guid isPermaLink="false">https://medium.com/p/a11ee4a6161a</guid>
            <category><![CDATA[function-in-sql-server]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[data-engineer]]></category>
            <dc:creator><![CDATA[akash ghanghav]]></dc:creator>
            <pubDate>Fri, 29 Dec 2023 09:04:03 GMT</pubDate>
            <atom:updated>2023-12-29T09:04:03.132Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQL Interview Questions — Functions in SQL Server</h3><blockquote><strong>Why SQL is important in data engineering and other data roles ?</strong></blockquote><p>SQL is crucial in data engineering and other data roles because it’s the language used to manage and manipulate databases. It helps in extracting, organizing, and analyzing data efficiently. SQL allows you to retrieve specific information, perform calculations, filter data, and modify databases, making it an essential skill for working with data in various roles, from data engineering to analytics and beyond.</p><blockquote><strong><em>What are the functions of SQL Server?</em></strong></blockquote><p>Functions in SQL Server are the database objects that contain a <strong>set of SQL statements to perform a specific task</strong>. A function accepts input parameters, performs actions, and then returns the result. We should note that functions always return either a single value or a table. The main purpose of functions is to replicate the common task easily. We can build functions one time and can use them in multiple locations based on our needs.</p><blockquote><strong>What are the rules for creating SQL Server functions?</strong></blockquote><ul><li>A function must have a name, and the name cannot begin with a special character such as @, $, #, or other similar characters.</li><li>We can use a function anywhere such as AVG, COUNT, SUM, MIN, DATE, and other functions with the SELECT query in SQL.</li><li>Whenever a function is called, it compiles.</li><li>Functions must return a value or result.</li><li>Functions use only input parameters.</li><li>We cannot use TRY and CATCH statements in functions.</li></ul><blockquote><strong>What are the types of functions?</strong></blockquote><ul><li>System-Defined Functions</li><li>User Defined Functions</li></ul><blockquote><strong>What are System Defined Functions?</strong></blockquote><p>Functions that are defined by the system are known as system-defined functions. In other words, all the <strong>built-in functions</strong> supported by the server are referred to as System functions. The built-in functions save us time while performing the specific task. These types of functions usually work with the SQL SELECT statement to calculate values and manipulate data.</p><blockquote><strong>What are User-Defined Functions?</strong></blockquote><p>Functions that are <strong>created by the user</strong> in the system database or a user-defined database are known as user-defined functions. The UDF functions accept parameters, perform actions, and return the result. These functions help us to simplify our development by encapsulating complex business logic and making it available for reuse anywhere based on the needs</p><blockquote><strong>What are the types of System Defined Functions?</strong></blockquote><ul><li><strong>String Functions </strong>(LEN, SUBSTRING, REPLACE, CONCAT, TRIM)</li><li><strong>Date and Time Functions </strong>(DateTime, CURRENT_DATE, CURRENT_TIME, YEAR, MONTH,day)</li><li><strong>Aggregate Functions</strong> (COUNT, MAX, MIN, SUM, AVG)</li><li><strong>Mathematical Functions </strong>(ABS, POWER, PI, EXP, LOG)</li><li><strong>Windows Functions </strong>(RANK, DENSE_RANK, ROW_NUMBER, NTILE)</li></ul><p>The following picture shows all the built-in database functions used in the SQL Server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*aMp-wLs1pP2N9qyVizjSiw.jpeg" /><figcaption><strong>Functions in SQL Server</strong></figcaption></figure><blockquote><strong>What are the types of User-Defined Functions?</strong></blockquote><p>User-defined functions mainly into two types:</p><ol><li><strong>Scalar Functions</strong></li><li><strong>Table-Valued Functions</strong></li></ol><blockquote><strong>What are Scalar Functions?</strong></blockquote><p>The scalar function in SQL Server always <strong>accepts parameters, either single or multiple, and returns a single value</strong>. The scalar functions are useful in the simplification of our code.</p><blockquote><strong>What is the Syntax of Scalar Functions?</strong></blockquote><p>Syntax:</p><pre>CREATE FUNCTION schema_name.function_name (parameter_list)<br>RETURNS data_type AS<br>BEGIN<br>statements<br>RETURN value<br>END</pre><blockquote><strong>Create a function to calculate the area of a rectangle based on the length and width.</strong></blockquote><pre>CREATE FUNCTION Calculate_Rectangle_Area(  <br>    @length DEC(10,2),  <br>    @width DEC(10,2)  <br>)  <br>RETURNS DEC(10,2)  <br>AS   <br>BEGIN  <br>    DECLARE @area DEC(10,2);<br>    SET @area = @length * @width;<br>    RETURN @area;<br>END;</pre><p>The following picture displays where we can find the scalar functions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*oW1c2QRZvi222UJ0-01wSg.png" /></figure><p>We can call the above Calculate_Rectangle_Area function as below:</p><pre>SELECT dbo.Calculate_Rectangle_Area(5,10) As Rectangle_Area</pre><p>Executing this function will return the Area of the Rectangle:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*58k8u4JDe3QBqdMwhb8sKQ.png" /></figure><blockquote><strong>What are Table-Valued Functions?</strong></blockquote><p>Table-valued functions in SQL Server are the <strong>user-defined function</strong> that returns data of a table type. Since this function’s <strong>return type is a table</strong>, we can use it the same way as we use a table.</p><p>We can categorize the table-valued function into two types:</p><ol><li><strong>Inline Table-Values Functions</strong></li><li><strong>Multi-statement table-valued functions (MSTVF)</strong></li></ol><blockquote><strong>What are Inline Table-Values Functions?</strong></blockquote><p>This UDF function returns a table variable based on the action performed by the function. A single SELECT statement should be used to determine the value of the table variable.</p><blockquote><strong>What are Multi-statement table-valued functions (MSTVF)?</strong></blockquote><p>This UDF function <strong>returns a table variable</strong> based on the action performed by the function. It can contain single or multiple statements to produce the result, and it is also a function that returns the result of multiple statements in a tabular form. It is useful because we can execute multiple statements in this function and get aggregated results into the returned table. We can define this function by using a table variable as the return value. Inside the function, we execute multiple queries and insert data into this table variable.</p><blockquote><strong>Create a table-values function and retrieve the data of the employee table.</strong></blockquote><pre>CREATE FUNCTION udf_GetEmployee()  <br>RETURNS TABLE  <br>AS  <br> RETURN (SELECT * FROM Employee)</pre><p>we can call the above <strong>udf_GetEmployee</strong> function as below:</p><pre>SELECT * FROM udf_GetEmployee();</pre><blockquote><strong>Creates a function name ‘MULTIVALUED’ that returns the ‘@Employee’ table. It contains three fields named id, emp_name, and salary from the ‘Employee’ table using INSERT statement, and then uses UPDATE statement to update the employee name.</strong></blockquote><pre>CREATE FUNCTION MULTIVALUED()  <br>RETURNS @Employee TABLE  <br>(id INT, emp_name VARCHAR(50), salary INT) AS  <br>BEGIN  <br>    INSERT INTO @Employee  <br>    SELECT E.id, E.emp_name, E.salary FROM Employee E;  <br>    UPDATE @Employee SET emp_name = &#39;Graeme Smith&#39; WHERE id = 3;  <br>    RETURN  <br>END</pre><p>we can call the above <strong>MULTIVALUED </strong>function as below:</p><pre>SELECT * FROM MULTIVALUED();</pre><blockquote><strong>How can you modify a function in SQL Server?</strong></blockquote><pre>ALTER FUNCTION schema_name.function_name (parameter_list)  <br>RETURNS data_type AS  <br>BEGIN  <br>    statements  <br>    RETURN value  <br>END</pre><blockquote><strong>What are Windows functions?</strong></blockquote><p>Window functions are used to <strong>perform a calculation on an aggregate value</strong> based on a set of rows and return multiple rows for each group. The window word represents the group of rows on which the function will be operated. This function performs a calculation in the same way that the aggregate functions would perform. Unlike aggregate functions that operate on the entire table, Window functions do not give a result to be combined into a single row. It means that window functions work on a group of rows and returns a total value for each row. As a result, each row retains its distinct identity.</p><blockquote><strong>What are the types of Windows functions?</strong></blockquote><ol><li><strong>Aggregate Window Functions:</strong> These functions operate on multiple rows. Examples of such functions are SUM(), MAX(), MIN(), AVG(), COUNT(), etc.</li><li><strong>Ranking Window Functions:</strong> These functions rank each row of a partition in a table. Example of such functions are RANK(), DENSE_RANK(), ROW_NUMBER(), NTILE(), PERCENT_RANK()etc.</li><li><strong>Value Window Functions:</strong> These functions are locally represented by a power series. Example of such functions are LAG(), LEAD(), FIRST_VALUE(), LAST_VALUE(), etc.</li></ol><blockquote><strong>What are String Functions?</strong></blockquote><p>String functions in SQL are used to manipulate and perform operations on string data types. Here are explanations for some common string functions:</p><ol><li>LEN (Length): Returns the number of characters in a string.</li><li>SUBSTRING: Extracts a portion of a string.</li><li>REPLACE: Replaces occurrences of a specified substring with another substring in a given string.</li><li>CONCAT (Concatenate): Combines two or more strings into a single string.</li><li>TRIM: Removes specified prefixes or suffixes (spaces by default) from a string.</li></ol><blockquote><strong>How can you find the length of a string in a SQL table using the LEN function?</strong></blockquote><pre>SELECT LEN(column_name) AS string_length<br>FROM your_table;</pre><blockquote><strong>Retrieve the first 5 characters of the ‘product_name’ column in the ‘Products’ table using the SUBSTRING function.</strong></blockquote><pre>SELECT SUBSTRING(product_name, 1, 5) AS extracted_string<br>FROM Products;</pre><blockquote><strong>Replace all occurrences of ‘old_value’ with ‘new_value’ in the ‘description’ column of the ‘Items’ table.</strong></blockquote><pre>UPDATE Items<br>SET description = REPLACE(description, &#39;old_value&#39;, &#39;new_value&#39;);</pre><blockquote><strong>Concatenate the ‘first_name’ and ‘last_name’ columns in the ‘Employees’ table and display the result as ‘full_name’.</strong></blockquote><pre>SELECT CONCAT(first_name, &#39; &#39;, last_name) AS full_name<br>FROM Employees;</pre><blockquote><strong>Trim leading and trailing spaces from the ‘city’ column in the ‘Customers’ table.</strong></blockquote><pre>SELECT TRIM(city) AS trimmed_city<br>FROM Customers;</pre><blockquote><strong>What are Date and Time Functions?</strong></blockquote><p>Date and time functions in SQL are used to perform operations on date and time values. These functions enable you to extract information from date and time values, manipulate them, and perform various calculations. Here are some common date and time functions:</p><ol><li>DateTime: Represents a specific point in time and includes both date and time components.</li><li>CURRENT_DATE: Returns the current date without the time component.</li><li>CURRENT_TIME: Returns the current time without the date component.</li><li>YEAR: Extracts the year from a date or datetime value.</li><li>MONTH: Extracts the month from a date or datetime value.</li><li>DAY: Extracts the day of the month from a date or datetime value.</li></ol><blockquote><strong>How can you retrieve the current date and time?</strong></blockquote><pre>SELECT DateTime() AS current_date_time;</pre><blockquote><strong>Retrieve records from the ‘Orders’ table where the order date is today using the CURRENT_DATE function.</strong></blockquote><pre>SELECT *<br>FROM Orders<br>WHERE order_date = CURRENT_DATE;</pre><blockquote><strong>Write a query to show the current time.</strong></blockquote><pre>SELECT CURRENT_TIME AS current_time;</pre><p><strong>Retrieve the year from the ‘birth_date’ column in the ‘Employees’ table.</strong></p><pre>SELECT YEAR(birth_date) AS birth_year<br>FROM Employees;</pre><blockquote><strong>Retrieve the month from the ‘hire_date’ column in the ‘Employees’ table.</strong></blockquote><pre>SELECT MONTH(hire_date) AS hire_month<br>FROM Employees;</pre><blockquote><strong>Retrieve the day from the ‘order_date’ column in the ‘Orders’ table.</strong></blockquote><pre>SELECT DAY(order_date) AS order_day<br>FROM Orders;</pre><blockquote><strong>What are Aggregate Functions?</strong></blockquote><p>Aggregate functions in SQL are used to perform a calculation on a set of values and return a single value.</p><p>Here are explanations for some common aggregate functions:</p><ol><li>COUNT: The COUNT() function returns the number of rows in a database table.</li><li>MAX: The MAX() aggregate function returns the highest value (maximum) in a set of non-NULL values.</li><li>MIN: The MIN() aggregate function returns the lowest value (minimum) in a set of non-NULL values.</li><li>SUM: The SUM() function returns the total sum of a numeric column.</li><li>AVG: The AVG() function calculates the average of a set of values.</li></ol><blockquote><strong>Write a query for How many orders are there in the ‘Orders’ table?</strong></blockquote><pre>SELECT COUNT(*) AS order_count<br>FROM Orders;</pre><blockquote><strong>Write a query for What is the highest salary among employees in the ‘Employees’ table?</strong></blockquote><pre>SELECT MAX(salary) AS max_salary<br>FROM Employees;</pre><blockquote><strong>Write a query for What is the lowest product price in the ‘Products’ table?</strong></blockquote><pre>SELECT MIN(price) AS min_price<br>FROM Products;</pre><blockquote><strong>Write a query What is the total quantity of products sold in the ‘OrderDetails’ table?</strong></blockquote><pre>SELECT SUM(quantity) AS total_quantity<br>FROM OrderDetails;</pre><blockquote><strong>Write a query for What is the average rating of products in the ‘ProductReviews’ table?</strong></blockquote><pre>SELECT AVG(rating) AS average_rating<br>FROM ProductReviews;</pre><blockquote><strong>What are Ranking Window Functions?</strong></blockquote><p>Ranking window functions are a category of SQL window functions that assign a rank or row number to each row within a partition of a result set. These functions are commonly used to analyze and compare the relative positions of rows based on certain criteria. The ranking window functions include:</p><ol><li>RANK(): Assigns a unique rank to each distinct row within the result set, with gaps in ranks for tied values.</li><li>DENSE_RANK(): Similar to RANK(), but it does not leave gaps for tied values, ensuring consecutive ranks without skipping numbers.</li><li>ROW_NUMBER(): Assigns a unique number to each row within a partition, without considering tied values.</li><li>NTILE(): Divides the result set into a specified number of roughly equal parts and assigns a bucket number to each row.</li><li>PERCENT_RANK(): Calculates the relative rank of each row within a partition as a percentage, considering tied values.</li></ol><p>These ranking window functions are often used in conjunction with the OVER clause to define the window or partition for ranking. The ORDER BY clause within the OVER clause specifies the column or columns based on which the ranking is determined.</p><blockquote><strong>Find the rank of employees based on their sales performance from SalesData.</strong></blockquote><pre>SELECT EmployeeID, Sales, RANK() OVER (ORDER BY Sales DESC) AS SalesRank<br>FROM SalesData;</pre><blockquote><strong>Find the dense rank of students based on their scores in a math competition.</strong></blockquote><pre>SELECT StudentID, MathScore, DENSE_RANK() OVER (ORDER BY MathScore DESC) AS MathRank<br>FROM MathCompetition;</pre><blockquote><strong>Provide a unique order number for each order within each customer’s transaction history.</strong></blockquote><pre>SELECT CustomerID, OrderID, ROW_NUMBER() OVER (PARTITION BY CustomerID ORDER BY OrderDate) AS OrderNumber<br>FROM Orders;</pre><blockquote><strong>Write a query to Calculate the percent rank of students based on their exam scores.</strong></blockquote><pre>SELECT StudentID, ExamScore, PERCENT_RANK() OVER (ORDER BY ExamScore DESC) AS PercentRank<br>FROM ExamResults;</pre><blockquote><strong>What are Value Window Functions?</strong></blockquote><p>These are functions that perform a calculation across a set of rows that are related to the current row. They don’t necessarily need to be represented by a power series. Examples of value window functions include LAG(), LEAD(), FIRST_VALUE(), LAST_VALUE().</p><ol><li>LAG(): LAG() accesses data from a previous row in the result set, based on a specified offset.</li><li>LEAD(): LEAD() accesses data from a subsequent row in the result set, based on a specified offset.</li><li>FIRST_VALUE(): FIRST_VALUE() returns the first value in an ordered partition of the result set.</li><li>LAST_VALUE(): LAST_VALUE() returns the last value in an ordered partition of the result set.</li></ol><p>These functions are valuable for performing calculations that involve values from other rows within a defined window or partition.</p><blockquote><strong>Write a query that retrieves the current date, revenue, and the previous day’s revenue using LAG().</strong></blockquote><pre>SELECT Date, Revenue, LAG(Revenue, 1) OVER (ORDER BY Date) AS PreviousRevenue<br>FROM SalesData;</pre><blockquote><strong>Write a query that retrieves the current date, revenue, and revenue for the next day using LEAD().</strong></blockquote><pre>SELECT Date, Revenue, LEAD(Revenue, 1) OVER (ORDER BY Date) AS NextRevenue<br>FROM SalesData;</pre><blockquote><strong>Write a query that retrieves the product ID, price, and the first price within each category using FIRST_VALUE().</strong></blockquote><pre>SELECT ProductID, Price, FIRST_VALUE(Price) OVER (PARTITION BY CategoryID ORDER BY Price) AS FirstPrice<br>FROM ProductPrices;</pre><blockquote><strong>Write a query that retrieves the product ID, price, and the last price within each category using LAST_VALUE().</strong></blockquote><pre>SELECT ProductID, Price, LAST_VALUE(Price) OVER (PARTITION BY CategoryID ORDER BY Price) AS LastPrice<br>FROM ProductPrices;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a11ee4a6161a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner’s Guide to Azure Data Factory: Unpacking Its Powers for Data Enthusiasts]]></title>
            <link>https://medium.com/@ghanghavakash/a-beginners-guide-to-azure-data-factory-unpacking-its-powers-for-data-enthusiasts-ba7aa2488a4e?source=rss-4bab9611f994------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba7aa2488a4e</guid>
            <category><![CDATA[azure-data-factory]]></category>
            <dc:creator><![CDATA[akash ghanghav]]></dc:creator>
            <pubDate>Thu, 21 Dec 2023 04:39:15 GMT</pubDate>
            <atom:updated>2023-12-21T04:39:15.053Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="AZURE DATA FACTORY" src="https://cdn-images-1.medium.com/max/828/1*72moxgM3_hUVEHU_WN3Wfw.jpeg" /></figure><h3><strong>I. Introduction to Azure Data Factory</strong></h3><p><strong><em>What is Azure Data Factory?</em></strong></p><p>Azure Data Factory is a robust cloud-based tool designed for data management. It operates in the cloud, leveraging the internet to execute its functions. Think of it as a versatile data orchestration tool that simplifies two key tasks:</p><ol><li><strong><em>Data Movement: </em></strong>It proficiently transfers data from one location to another, making it comparable to a data shuttle service that efficiently moves information from your data sources to their destination.</li><li><strong><em>Data Transformation:</em></strong> It can also process and enhance data to make it more valuable for analysis and decision-making. This is comparable to a data refinery, refining raw data into a more insightful format.</li></ol><p>Azure Data Factory performs these tasks seamlessly, providing data enthusiasts with a powerful solution for handling and optimizing their data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yWdLZT1-tznqyqRN2I0WTA.png" /><figcaption><strong>Azure Data Factory Portal</strong></figcaption></figure><p><strong><em>The Importance of Data Integration</em></strong></p><p>Data integration in Azure Data Factory is crucial as it seamlessly combines data from various sources, ensuring a unified and structured dataset for analysis. It cleanses and transforms data, making it usable, and supporting real-time processing. This vital process enhances data quality, governance, scalability, and performance, enabling data-driven decisions.</p><p><strong><em>Azure Data Factory in Data Analytics</em></strong></p><p>Azure Data Factory serves as a valuable tool in the realm of data analytics. It functions as a toolbox that collects, organizes, and prepares data for analysis. It plays a pivotal role in the world of data analytics, ensuring that the data flows seamlessly for analytical purposes.</p><figure><img alt="Connection and workflow of ADF" src="https://cdn-images-1.medium.com/max/800/1*vSwIsvatBlnzB3GXC03ycg.png" /><figcaption><strong>Connection and workflow of ADF</strong></figcaption></figure><h3>II. Understanding the Key Components of Azure Data Factory</h3><p><strong><em>Pipelines: </em></strong>These are sequences of data-driven tasks responsible for data movement, transformation, and coordination. Think of them as a sequence of instructions to manage your data efficiently.</p><p><strong><em>Datasets:</em></strong> Datasets act as containers for your data, specifying the exact data you intend to work with within your pipeline. They serve as a blueprint for the data you wish to manipulate.</p><p><strong><em>Linked Services:</em></strong> Linked services provide the necessary connection information to access external resources. They act as bridges to retrieve data from databases, cloud services, and other data sources.</p><p><strong><em>Activities:</em></strong> Activities encompass the actual operations performed on your data. These can include copying data, transforming it, or conducting other data-related tasks.</p><p><strong><em>Triggers:</em></strong> Triggers are scheduling mechanisms that determine when your data processes should initiate. They ensure that your data tasks commence at the designated time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*N4Z--le047sakjgBflq76Q.png" /><figcaption><strong>Key Components of Azure Data Factory</strong></figcaption></figure><p>These components collaborate to establish data workflows, streamlining data management and processing tasks for data enthusiasts.</p><h3>III. Azure Data Factory Interface and Functionality</h3><p><strong><em>Data Movement and Transformation:</em></strong> Azure Data Factory offers a user-friendly graphical interface for designing and coordinating data workflows. Users can create data pipelines for tasks such as data extraction, transformation, and loading (ETL) from diverse sources to different destinations. You can visualize this as defining the path of your data, applying transformations, and scheduling pipeline execution. Data Factory supports a wide range of connectors and transformations for seamless data integration and processing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*BjFMdkN87T8tmOTP2-yo1w.jpeg" /><figcaption><strong>Creating Pipeline</strong></figcaption></figure><p><strong><em>Monitoring and Management Tools:</em></strong> Azure Data Factory provides robust monitoring and management tools to track the execution of data pipelines, ensuring their smooth operation. Users can access activity runs, monitor pipeline performance, and receive alerts for any issues. For advanced monitoring, logging, and diagnostics, integration with Azure Monitor and Azure Log Analytics is available. Additionally, Azure Data Factory offers management features for maintaining and scaling data integration solutions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhby1DSD2RXIR7-BrMKWRQ.png" /><figcaption><strong><em>Monitoring View of Pipelines</em></strong></figcaption></figure><h3>IV. Azure Data Factory in Action:</h3><p><strong>Here are some real-world examples of how Azure Data Factory can be applied:</strong></p><p><strong><em>IoT Data Processing:</em></strong> With the growing use of Internet of Things (IoT) devices, Azure Data Factory can collect and process data from sensors, devices, or machines for purposes such as performance monitoring and predictive maintenance.</p><p><strong><em>Healthcare Data Integration:</em></strong> Healthcare organizations can employ Azure Data Factory to aggregate patient data from various sources, including electronic health records (EHR) and medical imaging devices. This integrated data serves multiple purposes, including patient care coordination, research, and billing.</p><p><strong><em>Manufacturing Supply Chain Optimization:</em></strong> Manufacturing companies can leverage Azure Data Factory to gather data from production lines, inventory systems, and suppliers. This data is then processed and utilized to enhance production schedules and reduce supply chain costs through machine learning models.</p><h3>V. Cost and Pricing</h3><p><strong><em>Overview of Azure Data Factory Pricing:</em></strong> Azure Data Factory’s cost is based on your actual usage. You are charged for the operations, data processing, and tasks you perform. The flexible pricing model means you only pay for what you use.</p><p><strong><em>Cost Optimization Tips for Azure Data Factory:</em></strong> To effectively manage costs, begin by analyzing your workloads to identify and eliminate unnecessary tasks. Utilize Azure Cost Management to pinpoint areas where cost savings are possible. While it won’t save you money, a cup of coffee can help keep you awake when reviewing your Azure bill.</p><p><strong><em>Comparing Azure Data Factory Pricing with Other Similar Tools:</em></strong> Azure Data Factory offers competitive pricing that varies based on the features you utilize. It’s wise to compare costs, much like evaluating different data tools to find the one that best fits your needs.</p><h3>Conclusion:</h3><p><strong><em>Summarizing Azure Data Factory:</em></strong> Azure Data Factory is a powerful tool for data enthusiasts. It is user-friendly, versatile, and capable of handling substantial data tasks. Moreover, it seamlessly integrates with other Azure services, making it an excellent choice for data management and analytics.</p><p><strong><em>Is Azure Data Factory Right for You?:</em></strong> If you work with substantial data volumes and require an efficient solution for data movement and transformation, Azure Data Factory is likely the ideal choice for your needs.</p><p><strong><em>Getting Started with Azure Data Factory:</em></strong> To embark on your journey with Azure Data Factory, sign up for an Azure account through the<a href="https://azure.microsoft.com/en-in/products/data-factory"> Azure portal</a> and create a subscription for Azure Data Factory.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba7aa2488a4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In SQL Server, there are various data types available to store different kinds of data.]]></title>
            <link>https://medium.com/@ghanghavakash/in-sql-server-there-are-various-data-types-available-to-store-different-kinds-of-data-8e5dcb56dc71?source=rss-4bab9611f994------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e5dcb56dc71</guid>
            <category><![CDATA[sql-server]]></category>
            <dc:creator><![CDATA[akash ghanghav]]></dc:creator>
            <pubDate>Thu, 18 May 2023 14:14:42 GMT</pubDate>
            <atom:updated>2023-05-18T14:14:42.061Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>SQL SERVER — DATATYPES</strong></h3><p><strong>In SQL Server, there are various data types available to store different kinds of data. Here are some commonly used data types in SQL Server:</strong></p><p>1. <strong>Numeric Types :</strong></p><p>Ø INT: Integer values ranging from -2,147,483,648 to 2,147,483,647.</p><p>Ø BIGINT: Large integer values ranging from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.</p><p>Ø DECIMAL(p, s): Fixed precision and scale decimal numbers.</p><p>Ø FLOAT: Approximate numeric data with floating-point precision.</p><p>2. <strong>Character Types :</strong></p><p>Ø CHAR(n): Fixed-length character strings with a maximum length of n.</p><p>Ø VARCHAR(n): Variable-length character strings with a maximum length of n.</p><p>Ø TEXT: Variable-length character data up to 2³¹-1 (2,147,483,647) characters.</p><p>3. <strong>Date and Time Types :</strong></p><p>Ø DATE: Stores a date value without time.</p><p>Ø TIME: Stores a time value without a date.</p><p>Ø DATETIME: Stores both date and time values.</p><p>Ø TIMESTAMP: Automatically generated unique values upon row insertion or update.</p><p>4. <strong>Binary Types:</strong></p><p>Ø BINARY(n): Fixed-length binary data with a maximum length of n.</p><p>Ø VARBINARY(n): Variable-length binary data with a maximum length of n.</p><p>Ø IMAGE: Variable-length binary data up to 2³¹-1 (2,147,483,647) bytes.</p><p>5. <strong>Boolean Type :</strong></p><p>Ø BIT: Represents a Boolean value, either 0 or 1.</p><p>6. <strong>Other Types :</strong></p><p>Ø XML: Stores XML data.</p><p>Ø UNIQUEIDENTIFIER: Stores a globally unique identifier (GUID).</p><p>Ø JSON: Stores JSON (JavaScript Object Notation) data.</p><p>These are just a few examples of the data types available in SQL Server. Each data type has specific characteristics and is used to store different kinds of data efficiently. It’s important to choose the appropriate data type based on the nature of the data being stored to ensure accurate representation and efficient storage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e5dcb56dc71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL COMMANDS]]></title>
            <link>https://medium.com/@ghanghavakash/sql-commands-57bd4aa93928?source=rss-4bab9611f994------2</link>
            <guid isPermaLink="false">https://medium.com/p/57bd4aa93928</guid>
            <dc:creator><![CDATA[akash ghanghav]]></dc:creator>
            <pubDate>Fri, 12 May 2023 14:57:20 GMT</pubDate>
            <atom:updated>2023-05-12T14:57:20.107Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Structured Query Language(SQL)</strong> as we all know is the database language by the use of which we can perform certain operations on the existing database and also we can use this language to create a database.</p><p><a href="https://www.geeksforgeeks.org/structured-query-language/"><strong>SQL</strong></a><strong> </strong>uses certain commands like Create, Drop, Insert, etc. to carry out the required tasks.</p><p>These<strong> </strong><a href="https://www.geeksforgeeks.org/sql-concepts-and-queries/"><strong>SQL </strong></a><strong>commands</strong> are mainly categorized into five categories :</p><p>1. DDL — Data Definition Language</p><p>2. DQL — Data Query Language</p><p>3. DML — Data Manipulation Language</p><p>4. DCL — Data Control Language</p><p>5. TCL — Transaction Control Language</p><p><strong>1. DDL (Data Definition Language):</strong></p><p><a href="https://www.geeksforgeeks.org/features-of-structured-query-language-sql/">DDL</a> or Data Definition Language actually consists of the SQL commands that can be used to define the database schema. It simply deals with descriptions of the database schema and is used to create and modify the structure of database objects in the database. DDL is a set of SQL commands used to create, modify, and delete database structures but not data. These commands are normally not used by a general user, who should be accessing the database via an application.</p><p>List of DDL commands :</p><p><a href="https://www.geeksforgeeks.org/sql-create/"><strong>CREATE</strong></a><strong>:</strong> This command is used to create the database or its objects (like table, index, function, views, store procedure, and triggers).</p><p><a href="https://www.geeksforgeeks.org/sql-drop-truncate/"><strong>DROP</strong></a><strong>:</strong> This command is used to delete objects from the database.</p><p><a href="https://www.geeksforgeeks.org/sql-alter-add-drop-modify/"><strong>ALTER</strong></a><strong>:</strong> This is used to alter the structure of the database.</p><p><a href="https://www.geeksforgeeks.org/sql-drop-truncate/"><strong>TRUNCATE</strong></a><strong>:</strong> This is used to remove all records from a table, including all spaces allocated for the records are removed.</p><p><a href="https://www.geeksforgeeks.org/sql-comments/"><strong>COMMENT</strong></a><strong>:</strong> This is used to add comments to the data dictionary.</p><p><a href="https://www.geeksforgeeks.org/sql-alter-rename/"><strong>RENAME</strong></a><strong>:</strong> This is used to rename an object existing in the database.</p><p><strong>2. DQL (Data Query Language):</strong></p><p>DQL statements are used for performing queries on the data within schema objects. The purpose of the DQL Command is to get some schema relation based on the query passed to it. We can define DQL as follows it is a component of SQL statement that allows getting data from the database and imposing order upon it. It includes the SELECT statement. This command allows getting the data out of the database to perform operations with it. When a SELECT is fired against a table or tables the result is compiled into a further temporary table, which is displayed or perhaps received by the program i.e. a front-end.</p><p>List of DQL Commands:</p><p><a href="https://www.geeksforgeeks.org/sql-select-clause/"><strong>SELECT</strong></a><strong>: </strong>It is used to retrieve data from the database.</p><p><strong>3. DML(Data Manipulation Language):</strong></p><p>The SQL commands that deal with the manipulation of data present in the database belong to DML or Data Manipulation Language and this includes most of the SQL statements. It is the component of the SQL statement that controls access to data and to the database. Basically, DCL statements are grouped with DML statements.</p><p>List of DML Commands:</p><p><a href="https://www.geeksforgeeks.org/sql-insert-statement/"><strong>INSERT</strong></a><strong>:</strong> It is used to insert data into a table.</p><p><a href="https://www.geeksforgeeks.org/sql-update-statement/"><strong>UPDATE</strong></a><strong>:</strong> It is used to update existing data within a table.</p><p><a href="https://www.geeksforgeeks.org/sql-delete-statement/"><strong>DELETE</strong></a><strong>:</strong> It is used to delete records from a database table.</p><p><strong>4. DCL (Data Control Language):</strong></p><p>DCL includes commands such as GRANT and REVOKE which mainly deal with the rights, permissions, and other controls of the database system.</p><p>List of DCL commands:</p><p><a href="https://www.geeksforgeeks.org/mysql-grant-revoke-privileges/"><strong>GRANT:</strong></a> This command gives users access privileges to the database.</p><p><a href="https://www.geeksforgeeks.org/difference-between-grant-and-revoke/"><strong>REVOKE:</strong></a><strong> </strong>This command withdraws the user’s access privileges given by using the GRANT command.</p><p><strong>5. TCL (Transaction Control Language):</strong></p><p>Transactions group a set of tasks into a single execution unit. Each transaction begins with a specific task and ends when all the tasks in the group successfully complete. If any of the tasks fail, the transaction fails. Therefore, a transaction has only two results: success or failure. You can explore more about transactions <a href="https://www.geeksforgeeks.org/sql-transactions/">here</a>. Hence, the following TCL commands are used to control the execution of a transaction:</p><p><strong>BEGIN</strong>: Opens a Transaction.</p><p><a href="https://www.geeksforgeeks.org/sql-transactions/"><strong>COMMIT</strong></a><strong>:</strong> Commits a Transaction.</p><p><a href="https://www.geeksforgeeks.org/sql-transactions/"><strong>ROLLBACK</strong></a><strong>:</strong> Rollbacks a transaction in case of any error occurs.</p><p><a href="https://www.geeksforgeeks.org/sql-transactions/"><strong>SAVEPOINT</strong></a><strong>:</strong> Sets a save point within a transaction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57bd4aa93928" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL — WHY IT IS REQUIRED ?]]></title>
            <link>https://medium.com/@ghanghavakash/sql-why-it-is-required-5ac3d63d4928?source=rss-4bab9611f994------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ac3d63d4928</guid>
            <dc:creator><![CDATA[akash ghanghav]]></dc:creator>
            <pubDate>Fri, 12 May 2023 14:47:19 GMT</pubDate>
            <atom:updated>2023-05-12T14:47:19.262Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQL — WHY IT IS REQUIRED ?</h3><h3>SQL</h3><p>A standard programming language that is used for Managing relational databases.</p><p>With SQL you can modify the database, add, update delete rows of data.</p><p>It’s used to interact with relational databases. A regional database organizes data into tables, like an Excel spreadsheet.</p><p>SQL works by understanding and analyzing data of virtually any size, from small datasets to large stacks.</p><p>It’s a very powerful tool that enables you to perform many functions at high efficiency and speed.</p><p>Databases are commonly used in the technology sector to support websites and businesses.</p><h3>However, SQL is used in many other industries as well :</h3><blockquote><strong>Finance industry</strong></blockquote><p>The finance industry is one of the biggest users of databases. Banking applications and payment processors are the most common applications of SQL. Since the internet is poorly regulated, banks require extra security precautions to make online transactions happen. SQL provides just that, along with great database support.</p><blockquote><strong>Music industry</strong></blockquote><p>The music industry has slowly undergone digitization. As a result, several companies were created to stream music. They require huge libraries of music available at any given moment to hundreds of millions of customers.</p><blockquote><strong>Social media</strong></blockquote><p>Facebook, Twitter, Instagram, and Snapchat all have an enormous amount of users that consume an incredible amount of bandwidth every single day.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ac3d63d4928" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL-Constraints]]></title>
            <link>https://medium.com/@ghanghavakash/sql-constraints-ab889797f07c?source=rss-4bab9611f994------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab889797f07c</guid>
            <dc:creator><![CDATA[akash ghanghav]]></dc:creator>
            <pubDate>Thu, 11 May 2023 14:31:34 GMT</pubDate>
            <atom:updated>2023-05-11T14:31:34.321Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQL Constraints</h3><p>SQL constraints are used to specify rules for the data in a table. SQL constraints are rules or conditions applied to a table or column. They define certain restrictions or requirements that data must meet in order to be valid.</p><p>The following constraints are commonly used in SQL :</p><ol><li><a href="https://www.w3schools.com/sql/sql_notnull.asp">NOT NULL</a></li></ol><p>Ensures that a column cannot have a NULL value</p><p><strong>CREATE TABLE Products (<br> ProductID INT PRIMARY KEY,<br> ProductName VARCHAR(100) NOT NULL);</strong></p><p>2. <a href="https://www.w3schools.com/sql/sql_unique.asp">UNIQUE</a></p><p>Ensures that all values in a column are different</p><p><strong>CREATE TABLE Customers (<br> CustomerID INT,<br> Email VARCHAR(100) UNIQUE,<br> Phone VARCHAR(20) UNIQUE<br>);</strong></p><p>3. <a href="https://www.w3schools.com/sql/sql_check.asp">CHECK</a></p><p>Ensures that the values in a column satisfy a specific condition</p><p><strong>CREATE TABLE Students ( StudentID INT PRIMARY KEY, StudentName VARCHAR(100), Age INT CHECK (Age &gt;= 18) );</strong></p><p>4. <a href="https://www.w3schools.com/sql/sql_default.asp">DEFAULT</a></p><p>Sets a default value for a column if no value is specified</p><p><strong>CREATE TABLE Employees (<br> EmployeeID INT PRIMARY KEY,<br> FirstName VARCHAR(50),<br> LastName VARCHAR(50),City VARCHAR(50) DEFAULT = ‘PUNE’<br>);</strong></p><p>5. <a href="https://www.w3schools.com/sql/sql_create_index.asp">CREATE INDEX</a></p><p>Used to create and retrieve data from the database very quickly</p><p><strong>CREATE INDEX IX_Employee_LastName ON Employee (LastName);</strong></p><p>6. <strong>Primary Key</strong></p><p>This constraint is used to uniquely identify each record in a table. It ensures that the primary key column(s) have unique values and cannot contain null values.</p><p><strong>CREATE TABLE Employees (<br> EmployeeID INT PRIMARY KEY,<br> FirstName VARCHAR(50),<br> LastName VARCHAR(50)<br>);</strong></p><p>7. <strong>Foreign Key</strong></p><p>A foreign key constraint establishes a relationship between two tables. It ensures that values in a column (foreign key) of one table correspond to the values in the primary key column of another table (referenced key).</p><p><strong>CREATE TABLE Orders ( OrderID INT PRIMARY KEY, CustomerID INT, OrderDate DATE, FOREIGN KEY (CustomerID) REFERENCES Customers(CustomerID) );</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab889797f07c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL — AGGREGATE FUNCTIONS]]></title>
            <link>https://medium.com/@ghanghavakash/sql-aggregate-functions-b6baeb33626f?source=rss-4bab9611f994------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6baeb33626f</guid>
            <dc:creator><![CDATA[akash ghanghav]]></dc:creator>
            <pubDate>Thu, 11 May 2023 14:31:01 GMT</pubDate>
            <atom:updated>2023-05-11T14:31:01.245Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQL — AGGREGATE FUNCTIONS</h3><h3><strong>Aggregate Functions</strong></h3><p>An aggregate function in SQL returns one value after calculating multiple values of a column. We often use aggregate functions with the <a href="https://www.simplilearn.com/tutorials/sql-tutorial/group-by-in-sql">GROUP BY</a> and <a href="https://www.simplilearn.com/tutorials/sql-tutorial/sql-having">HAVING clauses</a> of the SELECT statement.</p><p>Aggregate functions are used to combine the result of a group into a single such as COUNT, MAX, MIN, AVG, and SUM. These functions are also known as multiple-row functions.</p><p>The list of Aggregate Functions are :</p><p><strong>COUNT():</strong> Returns the number of rows of each group.</p><p>SELECT COUNT(*) FROM table_name;</p><p><strong>SUM():</strong> Returns the sum or total of each group.</p><p>SELECT SUM(column_name) FROM table_name;</p><p><strong>AVG():</strong> Returns the average and mean of each group.</p><p>SELECT AVG(column_name) FROM table_name;</p><p><strong>MIN():</strong> Returns the minimum value of each group.</p><p>SELECT MIN(column_name) FROM table_name;</p><p><strong>MAX():</strong> Returns the minimum value of each group.</p><p>SELECT MAX(column_name) FROM table_name;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6baeb33626f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL — SCHEMA]]></title>
            <link>https://medium.com/@ghanghavakash/sql-schema-8fc91767f9ad?source=rss-4bab9611f994------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fc91767f9ad</guid>
            <dc:creator><![CDATA[akash ghanghav]]></dc:creator>
            <pubDate>Thu, 11 May 2023 13:54:30 GMT</pubDate>
            <atom:updated>2023-05-11T13:54:30.679Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQL — SCHEMA</h3><h3>Database Schema</h3><p><strong>A database schema is a structure that represents the logical storage of the data in a database</strong>. It represents the organization of data and provides information about the relationships between the tables in a given database. In this topic, we will understand more about database schema and its types. Before understanding database schema, let&#39;s first understand what a Database is.</p><h3>What is a Database?</h3><p>A <a href="https://www.javatpoint.com/what-is-database">database</a> is a place to store information. It can store the simplest data, such as a list of people as well as the most complex data. The database stores the information in a well-structured format.</p><h3>What is Database Schema?</h3><ul><li>A database schema is the logical representation of a database, which shows how the data is stored logically in the entire database. It contains a list of attributes and instructions that informs the database engine that how the data is organized and how the elements are related to each other.</li><li>A database schema contains schema objects that may include <strong>tables, fields, packages, views, relationships, primary key, foreign key,</strong></li><li>In actuality, the data is physically stored in files that may be in unstructured form, but to retrieve it and use it, we need to put it in a structured form. To do this, a database schema is used. It provides knowledge about how the data is organized in a database and how it is associated with other data.</li><li><strong>The schema does not physically contain the data itself; instead, it gives information about the shape of data and how it can be related to other tables or models.</strong></li><li>A database schema object includes the following:</li><li>Consistent formatting for all data entries.</li><li>Database objects and unique keys for all data entries.</li><li>Tables with multiple columns, and each column contains its name and datatype.</li><li>The complexity &amp; the size of the schema vary as per the size of the project. It helps developers easily manage and structure the database before coding it.</li></ul><h3>Types of Database Schema</h3><p>The database schema is divided into three types, which are:</p><ol><li><strong>External Schema</strong></li><li><strong>Conceptual Schema</strong></li><li><strong>Internal Or Physical Schema</strong></li></ol><p><strong>Here’s how you can work with schemas in SQL:</strong></p><ol><li><strong>Creating a Schema</strong>: To create a schema, you can use the CREATE SCHEMA the statement followed by the schema name. For example:</li></ol><pre>CREATE SCHEMA my_schema;</pre><p><strong>2. Creating Objects within a Schema:</strong> After creating a schema, you can create database objects within it. For instance, to create a table within a schema, you would specify the schema name along with the table name:</p><pre>CREATE TABLE my_schema.my_table (     column1 datatype,     <br>column2 datatype,     ... );</pre><p><strong>3. Accessing Objects in a Schema:</strong> To access objects within a schema, you can use the fully qualified name, which includes the schema name and the object name. For example, to query data from a table within a schema, you would use:</p><pre>SELECT * FROM my_schema.my_table;</pre><p><strong>4. Deleting a Schema:</strong> To delete a schema, you can use the DROP SCHEMA statement. Be cautious, as this will also remove all objects contained within the schema. For example:</p><pre>DROP SCHEMA my_schema;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fc91767f9ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>