<?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 Nikhitha Perapola on Medium]]></title>
        <description><![CDATA[Stories by Nikhitha Perapola on Medium]]></description>
        <link>https://medium.com/@pnikhitha01?source=rss-4055fd72d418------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dzYXlTVx2QIwS4oRTf7kkA.jpeg</url>
            <title>Stories by Nikhitha Perapola on Medium</title>
            <link>https://medium.com/@pnikhitha01?source=rss-4055fd72d418------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 12:58:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pnikhitha01/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[10 ChatGPT Prompts That Optimizes 80% of My Job (As a Developer and PM)]]></title>
            <link>https://medium.com/@pnikhitha01/10-chatgpt-prompts-that-optimizes-80-of-my-job-as-a-developer-and-pm-8d6dc152cb40?source=rss-4055fd72d418------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d6dc152cb40</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[efficiency]]></category>
            <category><![CDATA[chatgpt4]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Nikhitha Perapola]]></dc:creator>
            <pubDate>Fri, 25 Apr 2025 01:11:22 GMT</pubDate>
            <atom:updated>2025-04-25T01:11:22.953Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“AI won’t steal your job, but the developer using AI might.”</blockquote><p>Still thinking ChatGPT is just for writing poems or funny tweets? Think again. I’m a full-time developer, and ChatGPT has quietly become the most productive member of my team. No office, no salary, no burnout — just brutal efficiency.</p><p>These 10 prompts aren’t just time-savers. They’re <strong>workflow transformers</strong>, <strong>debugging lifesavers</strong>, and <strong>learning accelerators</strong>. Here’s how I use them, and how you can too.</p><h3>1. “Explain this error like I’m five.”</h3><p>Prompt: Explain this error like I&#39;m five and give me a step-by-step fix.</p><p>✅ <em>Use it when</em>: You’re stuck on a cryptic error or exception trace (Python, JavaScript, anything).</p><p>💡 <em>Pro Tip</em>: Following up with Why does this error usually happen? the explanation often helps prevent it next time.</p><h3>2. “Write a clean function that does X in Python (or JavaScript, etc.)”</h3><p>Prompt: Write a clean, optimized Python function to validate email addresses.</p><p>✅ <em>Use it when</em>: Starting from scratch or comparing with your existing solution.</p><p>💡 <em>Pro Tip</em>: Ask it to “Add docstrings” or “Follow PEP8 style.” It actually does!</p><h3>3. “Generate SQL to do [insert logic]”</h3><p>Prompt: Generate a SQL query to fetch the top 3 products with the highest sales in each category.</p><p>✅ <em>Use it when</em>: Writing complex queries, especially involving GROUP BY, JOINs, and window functions.</p><p>💡 <em>Pro Tip</em>: Ask ChatGPT to explain <em>why</em> it used certain functions — it’s like a mini SQL tutor.</p><h3>4. “Refactor this code to make it more readable.”</h3><p>Prompt: Refactor the below function to improve readability and add comments. (Paste code)</p><p>✅ <em>Use it when</em>: Your code works, but looks like a crime scene.</p><p>💡 <em>Pro Tip</em>: You can even ask it to make the code more beginner-friendly or suitable for interviews.</p><h3>5. “Summarize this documentation or code snippet.”</h3><p>Prompt: Summarize this documentation/code in bullet points with use-case examples.</p><p>✅ <em>Use it when</em>: You inherit legacy code or face 10-page docs with zero time to read.</p><p>💡 <em>Pro Tip</em>: Ask for a TL;DR or a beginner explanation — it gives multiple reading levels.</p><h3>6. “Write a unit test for this function”</h3><p>Prompt: Write a unit test in Jest for this JavaScript function that checks if a number is prime.</p><p>✅ <em>Use it when</em>: You’re writing tests and want to speed up test case generation.</p><p>💡 <em>Pro Tip</em>: Ask it to include both valid and edge cases — it’s surprisingly thorough.</p><h3>7. “Explain how this tech works with a real-world analogy.”</h3><p>Prompt: Explain how JWT authentication works using a pizza delivery analogy.</p><p>✅ <em>Use it when</em>: You’re prepping a tech talk or trying to teach someone.</p><p>💡 <em>Pro Tip</em>: You can stack analogies. Try: “Now explain it like I’m a pirate.” Fun + effective.</p><h3>8. “Create a script that does X automatically.”</h3><p>Prompt: Write a PowerShell script to back up a folder to a timestamped zip file.</p><p>✅ <em>Use it when</em>: You want to automate tedious tasks across systems.</p><p>💡 <em>Pro Tip</em>: Add log actions to a file and notify me via email if errors occur — and boom, you have a mini DevOps bot.</p><h3>9. “Generate a README for this project.”</h3><p>Prompt: Write a professional README for a Flask web app that includes setup, usage, and contribution guidelines.</p><p>✅ <em>Use it when</em>: You’re done coding but want to polish your GitHub.</p><p>💡 <em>Pro Tip</em>: Ask for a markdown version with emojis and badges — it really makes your repo stand out.</p><h3>10. “Review this UI design/code from a user perspective.”</h3><p>Prompt: Review this HTML/CSS layout and suggest UI/UX improvements like a designer.</p><p>✅ <em>Use it when</em>: You’ve been staring at your design for too long to notice flaws.</p><p>💡 <em>Pro Tip</em>: Ask for mobile-first suggestions — a great way to catch responsive design issues early.</p><h3>Bonus for Developers: “Simulate a code interview”</h3><p>Prompt: Pretend you’re an interviewer and ask me intermediate-level coding questions one by one. Wait for my answers before continuing.</p><p>✅ <em>Use it when</em>: Practicing for tech interviews or sharpening your skills.</p><p>💡 <em>Pro Tip</em>: You can ask it to give feedback after each answer. Instant code coach.</p><h3>Bonus for Project Managers:</h3><h4>“Draft a project update email for stakeholders”</h4><p>Prompt: Write a concise project status update email for stakeholders covering key milestones, risks, and next steps.</p><p>✅ <em>Use it when</em>: You need a polished update fast.</p><p>💡 <em>Pro Tip</em>: Add your tone preference like “make it sound confident but honest” or “include a timeline table.”</p><h4>“Create a project timeline with dependencies.”</h4><p>Prompt: Generate a visual project timeline for a software rollout including dependencies between design, development, testing, and deployment.</p><p>✅ <em>Use it when</em>: Planning phases or building presentation material.</p><p>💡 <em>Pro Tip</em>: Ask it to break it down by week and add risk buffers — great for exec reviews.</p><h3>⚠️ A Quick Note on Privacy and Security</h3><p>While these prompts are incredibly useful, remember: <strong>never paste sensitive or proprietary company data into ChatGPT or any external AI tool</strong>. Treat it like any cloud-based service — if it’s confidential, don’t share it.</p><p>Use mock data or sanitize inputs before prompting, especially when dealing with customer info, internal project code, or production credentials.</p><h3>Final Thoughts</h3><p>These aren’t just “ChatGPT tricks.” They’re <em>productivity accelerators</em>. The more you use them, the better you get at asking, iterating, and leveraging AI for actual impact.</p><p>💥 Whether you’re a junior dev, a tech lead, or a project manager, these prompts can help you:</p><ul><li>Reduce cognitive overload</li><li>Work faster without cutting corners</li><li>Communicate and plan better</li></ul><p>So go ahead — steal my prompts, tweak them, remix them. Let AI do the grunt work while you focus on the big stuff.</p><p>💬 Got your own favorite prompt? Drop it in the comments — let’s build smarter together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d6dc152cb40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigating the Data Landscape: Business, Data, Analysis, Analytics, Intelligence, and Science]]></title>
            <link>https://medium.com/@pnikhitha01/navigating-the-data-landscape-business-data-analysis-analytics-intelligence-and-science-49861bd8bd8a?source=rss-4055fd72d418------2</link>
            <guid isPermaLink="false">https://medium.com/p/49861bd8bd8a</guid>
            <category><![CDATA[buisness-intelligence]]></category>
            <category><![CDATA[analysis]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Nikhitha Perapola]]></dc:creator>
            <pubDate>Sat, 28 Oct 2023 09:05:04 GMT</pubDate>
            <atom:updated>2023-10-28T09:05:04.635Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s corporate world, terms related to business, data, analysis, analytics, intelligence, and science are more important than ever. The growing importance of these terms is evident as they play pivotal roles in various processes and functions. To navigate this data-centric landscape effectively, it’s crucial to understand the distinctions between these terms and how they contribute to the success of organizations.</p><h3><strong>Business Terms</strong></h3><p>At the core of any discussion on business is the term “business” itself, representing ongoing activities <strong>aimed at making a profit</strong>. Any role associated with “business” in its title is invariably linked to the <strong>financial aspect </strong>of these activities.</p><ul><li><strong>Business Analytics:</strong> This term focuses on improving business operations. It involves systematic approaches to understanding how a business operates and identifying opportunities <strong>for improvement.</strong></li><li><strong>Business Analysis:</strong> This discipline provides a comprehensive and systematic approach to <strong>gaining insights</strong> into a business’s operations.</li><li><strong>Business Intelligence (BI):</strong> BI, on the other hand, delves into the past of a firm. It’s a <strong>technology-driven process </strong>that analyzes past data to deliver actionable information. BI encompasses various activities, including business and data analysis.</li></ul><h3><strong>Types of Data</strong></h3><p>Understanding the nature of data is equally important:</p><ul><li><strong>Qualitative Data: </strong>This type typically appears in the form of <strong>text </strong>and is <strong>descriptive</strong>. It includes data gathered from sources like customer feedback, research, and social media posts.</li><li><strong>Quantitative Data: </strong>On the other hand, quantitative data is <strong>numeric </strong>and lends itself to statistical and mathematical computations. It includes information such as the number of units produced or population statistics.</li></ul><h3><strong>Analysis vs. Analytics</strong></h3><p>Distinguishing between “analysis” and “analytics” can be challenging but is vital in a data-driven environment.</p><ul><li><strong>Analysis</strong>: This process involves dissecting past data into its component pieces and analyzing them separately. It primarily deals with historical data.</li><li><strong>Analytics</strong>: Analytics, on the other hand, is forward-looking. It combines analysis with logical and computational reasoning to explore patterns in data and predict future performance.</li></ul><h3>Data Science</h3><p>Data Science is a multidisciplinary field that encompasses a broad spectrum of data-related activities. It draws from diverse disciplines, including <strong>mathematics, statistics, artificial intelligence, computer engineering, scientific computing, advanced analytics, and machine learning.</strong> Data scientists utilize data analysis and analytics to derive insights, create predictive models, and craft data-driven solutions.</p><h3>The Key Distinctions</h3><ul><li>Business Analysis: Systematic approach to improve business operations.</li><li>Business Analytics: Solving business problems using data analysis.</li><li>Data Analytics: Identifying patterns to inform decisions.</li><li>Data Analysis: Processing and deriving insights from historical data.</li><li>Business Intelligence (BI): A technology-driven process analyzing past data for actionable insights.</li><li>Data Science: A diverse field using methods from mathematics, statistics, AI, and more.</li></ul><h3>Conclusion:</h3><p>In this era of data-driven decision-making, a clear understanding of these terms is indispensable for professionals and organizations looking to thrive in a rapidly evolving business environment. So, whether you’re analyzing historical data or embarking on predictive analytics for the future, a solid grasp of these terms will be your compass in the data landscape.</p><p><em>HOPE THIS ARTICLE HELPED :))</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49861bd8bd8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a static website using Amazon S3]]></title>
            <link>https://medium.com/@pnikhitha01/creating-a-static-website-using-amazon-s3-88b730c864f6?source=rss-4055fd72d418------2</link>
            <guid isPermaLink="false">https://medium.com/p/88b730c864f6</guid>
            <category><![CDATA[static-websites]]></category>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[website-development]]></category>
            <category><![CDATA[aws-policies]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Nikhitha Perapola]]></dc:creator>
            <pubDate>Fri, 20 Oct 2023 12:59:20 GMT</pubDate>
            <atom:updated>2023-10-20T12:59:20.165Z</atom:updated>
            <content:encoded><![CDATA[<p>In the digital era, websites are essential for personal and business use. For cost-effective static site hosting, Amazon S3 is an excellent option. This guide will show you how to create a static website on Amazon S3 with a custom error page, ideal for HTML, CSS, JavaScript, and images. Let’s begin!</p><h3>Prerequisites</h3><p>Before we dive into the process, ensure you have the following:</p><ol><li>An Amazon Web Services (AWS) account.</li><li>Basic knowledge of HTML and website development.</li><li>A GitHub repository with sample HTML files: <a href="https://github.com/nikhitha-perapola/Static_Website_using_AWS_S3"><strong><em>https://github.com/nikhitha-perapola/Static_Website_using_AWS_S3</em></strong></a></li></ol><h3>Step 1: Log in to Your AWS Console</h3><p>Log in to your AWS Console using your AWS account credentials. This is your starting point for setting up your static website.</p><h3>Step 2: Prepare Your Website Files</h3><p>You can use the sample HTML files provided in the <a href="https://github.com/nikhitha-perapola/Static_Website_using_AWS_S3"><strong><em>GitHub repository</em></strong></a> as a starting point. Download these files and customize them according to your website preferences. Ensure that you have an index.html file for your main page and an error.html file for your custom error page.</p><h3>Step 3: Create an S3 Bucket</h3><p>Now, let’s create an S3 bucket to host your static website:</p><ul><li>In the AWS Console, navigate to the <strong>S3 </strong>service.</li><li>Click on “<em>Create bucket</em>.”</li></ul><p>Set the following values:</p><ul><li>Bucket name of your choice (e.g., nikhibucket).</li><li>Select your desired region.</li></ul><p>In the “<strong>Block Public Access settings</strong>” section, <strong>UN-CHECK</strong> “Block all public access.” Ensure that all four permissions restrictions beneath it are also unchecked.</p><p>Check the acknowledgment box and leave the rest of the settings as their defaults.</p><p>Click “<em>Create bucket.</em>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qeFlw9CjSgOAI9sgNkSo-w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fmNq-6gVwzuOj4ZD6CqcVw.png" /></figure><h3>Step 4: Upload Your Website Files</h3><p>Next, you need to upload all the necessary files to deploy your website into the S3 bucket:</p><ul><li>Click on the bucket name (nikhibucket in this case).</li><li>Click on “<em>Add files</em>” and upload the index.html and error.html files that you previously downloaded from the<strong> </strong><a href="https://github.com/nikhitha-perapola/Static_Website_using_AWS_S3"><strong>GitHub repository.</strong></a></li><li>Click the “<em>Upload</em>” button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UqjChG7eAcD_4FhMBNlyNA.png" /></figure><h3>Step 5: Enable Static Website Hosting</h3><p>To make your S3 bucket host a static website, follow these steps:</p><ul><li>Open the S3 bucket you created.</li><li>Click on “<em>Properties</em>.”</li><li>Scroll to the bottom of the screen and find the “Static Website Hosting” section.</li><li>On the right, click on “<em>Edit</em>” and enable it.</li><li><strong>Static website hosting</strong>: Enable</li><li><strong>Hosting type</strong>: Host a static website</li><li>Enter the file names of your index and error documents.</li><li>Click “<em>Save changes.</em>”</li></ul><h3>Step 6: Apply a Bucket Policy</h3><p>To allow public access to your static website, you need to create a <strong>bucket policy</strong>:</p><ul><li>Open the S3 bucket you created.</li><li>Click on “<em>Permissions</em>.”</li><li>In the “Bucket Policy” section, click “<em>Edit</em>.”</li><li>Copy the Bucket ARN.</li></ul><p>On the right, click on “<em>Policy generator</em>” and select the following values:</p><ul><li>Select Type of Policy: S3 Bucket Policy</li><li>Effect: Allow</li><li>Principal: Enter *.</li><li>Actions: Select GetObject</li><li>Amazon Resource Name (ARN): Paste the Bucket ARN you copied earlier followed by /* so the policy applies to all the objects within the bucket.</li></ul><p>Click “<em>Add Statement</em>.”</p><p>Click “<em>Generate Policy.</em>” Copy the entire JSON document, return to the bucket policy screen, and paste the JSON in the “Policy” section. You can ignore any errors if they appear.</p><p>Click “<em>Save Changes</em>.”</p><h3>Step 7: Verify Your Website</h3><p>Refresh your S3 bucket page, and you will notice that your bucket is now <strong>PUBLICLY ACCESSIBLE</strong>. Scroll down in “Bucket properties” to the “Static website hosting” section again to find the bucket URL. Open it in a new tab, and voilà! You have successfully created a static website that is publicly accessible using Amazon S3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*srQcNQ4RV44cBwfwgbDpwg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wvJiKJfJi9rMG3MNE5GfUw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p3HHK_v4B3N8YyiiSz-KhA.png" /><figcaption>Open the bucket URL in the new tab/ new window.</figcaption></figure><p>You can test your custom error page by adding /something-random it at the end of the URL to see if it works as expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DMPlgktFTp8m5iEB8cvjPQ.png" /></figure><h3>Congratulations! You’ve just set up a simple and cost-efficient website using Amazon S3. Now you can share your content with the world.</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88b730c864f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Multi-Region and Multi-Cloud Infrastructure with Terraform]]></title>
            <link>https://medium.com/@pnikhitha01/deploying-multi-region-and-multi-cloud-infrastructure-with-terraform-87d2ff552120?source=rss-4055fd72d418------2</link>
            <guid isPermaLink="false">https://medium.com/p/87d2ff552120</guid>
            <category><![CDATA[multi-region]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[multi-cloud]]></category>
            <category><![CDATA[aws-azure]]></category>
            <category><![CDATA[terraform-provider]]></category>
            <dc:creator><![CDATA[Nikhitha Perapola]]></dc:creator>
            <pubDate>Wed, 11 Oct 2023 11:04:48 GMT</pubDate>
            <atom:updated>2023-10-11T11:04:48.433Z</atom:updated>
            <content:encoded><![CDATA[<p>Terraform Providers, Launching Infrastructure in Multiple Regions, Launching Infrastructure in Multi-Cloud (Hybrid Cloud)</p><p><em>~ Nikhitha Perapola</em></p><p>Terraform, the Infrastructure as Code (IAC) tool, has gained immense popularity in the world of cloud provisioning and management. It allows you to define and provision your infrastructure using configuration files. In this article, we’ll explore how to leverage Terraform to launch infrastructure in multiple regions and across multiple cloud providers, also known as multi-cloud or hybrid cloud deployment.</p><h3>Prerequisites</h3><p>Before diving into multi-region and multi-cloud deployments with Terraform, you should have a fundamental understanding of<strong><em> </em></strong><a href="https://medium.com/@pnikhitha01/getting-started-with-terraform-infrastructure-as-code-for-aws-54bd64cd9499"><strong><em>creating EC2 instances using Terraform</em></strong></a> and be familiar with the concepts of multi-region and multi-cloud environments.</p><h3>Understanding the Main.tf file</h3><p>A typical Terraform project’s main.tf file primarily contains two important elements:</p><ol><li>Provider Block: This block specifies the cloud provider, its configuration, region, and access keys. It is essential for Terraform to identify where to create the infrastructure.</li><li>Resource Block: Within this block, you define the resource you want to launch, such as an EC2 instance. The resource block includes the necessary inputs, like the resource type and the AMI ID.</li></ol><h3>Terraform Providers</h3><p>Terraform supports a wide range of providers, categorized into three sections:</p><ul><li><strong>Official Providers</strong>: Maintained actively by HashiCorp, these include popular cloud providers like AWS, Azure, GCP, and Kubernetes.</li><li><strong>Partner Providers</strong>: These providers are not created and maintained by HashiCorp but are actively supported by the respective cloud providers. Examples include Alibaba Cloud and Oracle.</li><li><strong>Community Providers</strong>: Developed and maintained by the open-source community, these providers expand Terraform’s capabilities.</li></ul><h3>Launching Infrastructure in Multiple Regions</h3><p>Let’s consider a scenario where you want to implement multi-region infrastructure in AWS using Terraform. To achieve this:</p><ol><li>Your Terraform project should have two provider blocks, each with a unique alias.</li><li>When creating a resource (e.g., an EC2 instance) in a specific region within the multi-region infrastructure, follow these steps:</li></ol><ul><li>Start with the standard Terraform resource block.</li><li>Add the ‘provider’ attribute and initialize it based on the region where you want to launch the resource. Use the alias to specify the region.</li></ul><p>Here’s an example of how this can be done:</p><pre>provider &quot;aws&quot; {<br>  alias = &quot;us-east-1&quot;<br>  region = &quot;us-east-1&quot;<br>}<br><br>provider &quot;aws&quot; {<br>  alias = &quot;us-west-2&quot;<br>  region = &quot;us-west-2&quot;<br>}<br><br>resource &quot;aws_instance&quot; &quot;example&quot; {<br>  ami           = &quot;ami-0123456789abcdef0&quot;<br>  instance_type = &quot;t2.micro&quot;<br>  provider      = &quot;aws.us-east-1&quot;<br>}<br><br>resource &quot;aws_instance&quot; &quot;example2&quot; {<br>  ami           = &quot;ami-0123456789abcdef0&quot;<br>  instance_type = &quot;t2.micro&quot;<br>  provider      = &quot;aws.us-west-2&quot;<br>}</pre><p>provider = “aws.us-east-1” # provider_name.alias_name</p><p>You can create as many provider blocks as needed based on the regions required for your resources.</p><h3>Launching Infrastructure in Multi-Cloud (Hybrid Cloud)</h3><p>Multi-cloud deployment is commonly used in organizations that operate in a hybrid cloud environment. Here’s an example of deploying resources in both AWS and Azure using Terraform:</p><ol><li>Create a providers.tf file in the root directory of your Terraform project.</li><li>In the providers.tf file, define provider blocks for AWS and Azure, specifying the necessary credentials and configurations.</li></ol><p>Example providers.tf:</p><pre>provider &quot;aws&quot; {<br>  region = &quot;us-east-1&quot; <br>}<br><br>provider &quot;azurerm&quot; {<br>  subscription_id = &quot;your-azure-subscription-id&quot;<br>  client_id       = &quot;your-azure-client-id&quot;<br>  client_secret   = &quot;your-azure-client-secret&quot;<br>  tenant_id       = &quot;your-azure-tenant-id&quot;<br>}</pre><p>In other Terraform configuration files (main.tf), you can use the aws and azurerm providers to create resources in AWS and Azure, respectively.</p><p>Example resource blocks:</p><pre>resource &quot;aws_instance&quot; &quot;example&quot; {<br>  ami           = &quot;ami-0123456789abcdef0&quot;<br>  instance_type = &quot;t2.micro&quot;<br>}<br><br>resource &quot;azurerm_virtual_machine&quot; &quot;example&quot; {<br>  name     = &quot;example-vm&quot;<br>  location = &quot;eastus&quot;<br>  size     = &quot;Standard_A1&quot;<br>}</pre><p>Remember that the name of the Azure provider in Terraform is ‘<em>azurerm</em>,’ and you can refer to <a href="https://registry.terraform.io/providers/hashicorp/azurerm/latest">its configuration structure in the official Terraform documentation.</a></p><p>In multi-cloud or hybrid cloud scenarios, always consult Terraform’s official documentation for resource block and provider block syntax, and refer to cloud providers’ specific configurations as needed.</p><p>Conclusion</p><p>Terraform offers the flexibility to deploy infrastructure across multiple regions and cloud providers, making it a powerful tool for managing complex, distributed environments. By following the steps outlined in this article, you can effectively harness Terraform’s capabilities for multi-region and multi-cloud deployments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87d2ff552120" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Terraform: Infrastructure as Code for AWS]]></title>
            <link>https://medium.com/@pnikhitha01/getting-started-with-terraform-infrastructure-as-code-for-aws-54bd64cd9499?source=rss-4055fd72d418------2</link>
            <guid isPermaLink="false">https://medium.com/p/54bd64cd9499</guid>
            <category><![CDATA[hcl]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Nikhitha Perapola]]></dc:creator>
            <pubDate>Tue, 10 Oct 2023 13:32:54 GMT</pubDate>
            <atom:updated>2023-10-10T13:32:54.523Z</atom:updated>
            <content:encoded><![CDATA[<p>Basic Understanding of Terraform and how to create an EC2 instance.</p><p>~ Nikhitha Perapola</p><p>Infrastructure as Code (IAC) has become an essential practice for DevOps and cloud engineers to automate the provisioning and management of cloud resources. AWS offers CloudFormation Templates (CFT) as its IAC solution, but there’s another powerful tool in town — Terraform. In this article, we’ll explore what Terraform is and how to create an EC2 instance in Linux OS using it.</p><h3>Terraform vs. CloudFormation Templates</h3><p>CFT (AWS): CloudFormation Templates</p><ul><li>Infrastructure as code (creating templates using JSON/YAML, Python API, etc.).</li><li>Using a templating language like JSON/YAML.</li><li>Utilizes CFT documentation for templates.</li></ul><p>Why Terraform?</p><ul><li>As a DevOps or cloud engineer, different cloud providers have different IAC tools.</li><li>Terraform offers a universal approach for all cloud providers.</li><li>Terraform uses HashiCorp’s templating language.</li><li>Follows the concept of ‘API as Code.’</li></ul><h3>Creating an EC2 Instance Using Terraform</h3><p>Prerequisites Required:</p><ol><li>Create an AWS account in a specific region (e.g., us-east-1).</li><li>Create an access key and make a note of the Access Key ID and Secret Access Key (needed for CLI access).</li><li>Create a VPC, subnet, and key pair (default VPC and subnet can be used if available).</li></ol><h3>Step 1: Install Terraform</h3><p>Follow these steps to install Terraform on your system. You can refer to <a href="https://developer.hashicorp.com/terraform/downloads"><strong>HashiCorp Terraform’s official documentation</strong></a> for installation instructions tailored to your operating system.</p><p>For example, on RHEL Linux:</p><pre>sudo yum install -y yum-utils<br>sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo<br>sudo yum -y install terraform</pre><p>Verify the installation by checking the Terraform version:</p><pre>terraform --version</pre><h4>Connect to Your AWS Account</h4><p>Configure your AWS CLI by running the following command and providing the Access Key ID, Secret Access Key, region, and output format (JSON):</p><pre>aws configure</pre><p>To verify the successful connection, list the S3 buckets:</p><pre>aws s3 ls</pre><h3>Create a Terraform Configuration File</h3><p>Create a Terraform file (e.g., ec2.tf) to define your EC2 instance configuration. Ensure that the directory contains only one .tf file for Terraform to work without errors:</p><pre>vi ec2.tf</pre><p>Terraform Code:</p><pre>provider &quot;aws&quot; {<br>    region = &quot;us-east-1&quot;  # Set your desired AWS region<br>}<br><br>resource &quot;aws_instance&quot; &quot;my_ec2_instance&quot; {<br>    ami           = &quot;ami-06**********&quot;  # Enter a valid AMI ID for your region<br>    instance_type = &quot;t2.micro&quot; <br>    subnet_id     = &quot;subnet-0ad********&quot;  # Enter the subnet ID<br>    key_name      = &quot;key-pair-name&quot;  # Enter the key pair name<br>}</pre><h3>Terraform Commands</h3><p>Use the following Terraform commands to manage your infrastructure:</p><ol><li><strong>terraform init</strong>: Initialize your Terraform working directory to download necessary providers and set up your environment.</li><li><strong>terraform plan</strong>: Generate an execution plan to compare your desired infrastructure state with the current state and view changes Terraform will make.</li><li><strong>terraform apply</strong>: Apply the changes to your infrastructure based on the execution plan. This creates or modifies resources as per your configuration. Enter ‘yes’ when the CLI asks ‘Do you want to perform these actions’. Every time you debug your terraform code, run ‘terraform apply’.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*eMuAagcowF8jlsHSO1-ZsQ.png" /><figcaption>Once you see this message, it means your AWS resource has been created successfully. You can verify this in the AWS console. Here, I have created a basic AWS EC2 Instance.</figcaption></figure><ol><li><strong>terraform destroy</strong>: To tear down all resources managed by Terraform, use this command. Be cautious, as it is <strong>irreversible </strong>and will delete resources.</li></ol><p>Conclusion</p><p>Terraform simplifies IAC across various cloud providers and offers a consistent approach to infrastructure management. By following the steps above, you can create and manage AWS resources, such as EC2 instances, efficiently using Terraform.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54bd64cd9499" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HackerRank SQL Practice- Aggregation]]></title>
            <link>https://medium.com/@pnikhitha01/hackerrank-sql-practice-aggregation-befcf0a10878?source=rss-4055fd72d418------2</link>
            <guid isPermaLink="false">https://medium.com/p/befcf0a10878</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[hackerrank]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[hackerrank-solutions-sql]]></category>
            <category><![CDATA[aggregate-function]]></category>
            <dc:creator><![CDATA[Nikhitha Perapola]]></dc:creator>
            <pubDate>Fri, 11 Aug 2023 15:00:47 GMT</pubDate>
            <atom:updated>2023-08-11T15:00:47.385Z</atom:updated>
            <content:encoded><![CDATA[<p>(Aggregate functions)</p><ol><li><strong>Revising Aggregations — The Count Function</strong></li></ol><p>Query a count of the number of cities in <strong>CITY</strong> having a Population larger than 100,000.</p><p><strong>Input Format</strong></p><p>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*ssWNNeW6aSe26dVu.jpg" /></figure><p>Solution:</p><pre>select count(id) from city where population&gt;100000;</pre><p><strong>2. Revising Aggregations — The Sum Function</strong></p><p>Query the total population of all cities in <strong>CITY</strong> where District is <strong>California</strong>.</p><p><strong>Input Format</strong></p><p>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*pr5Zmx-X3wWKGub_.jpg" /></figure><p>Solution:</p><pre>select sum(population) from city where district = &#39;California&#39;;</pre><p><strong>3. Revising Aggregations — Averages</strong></p><p>Query the average population of all cities in <strong>CITY</strong> where District is <strong>California</strong>.</p><p><strong>Input Format</strong></p><p>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*VdW2HhMD-hJLUAnd.jpg" /></figure><p>Solution:</p><pre>select avg(population) from city where district = &#39;California&#39;;</pre><p><strong>4. Average Population</strong></p><p>Query the average population for all cities in <strong>CITY</strong>, rounded down to the nearest integer.</p><p><strong>Input Format</strong></p><p>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*rTvML92sVfXKoIhx.jpg" /></figure><p>Solution:</p><pre>select floor(avg(population)) from city;</pre><p><strong>5. Japan Population</strong></p><p>Query the sum of the populations for all Japanese cities in <strong>CITY</strong>. The COUNTRYCODE for Japan is <strong>JPN</strong>.</p><p><strong>Input Format</strong></p><p>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*kjGh8vZrIKEhKoha.jpg" /></figure><p>Solution:</p><pre>select sum(population) from city where countrycode = &#39;JPN&#39;;</pre><p><strong>6. Population Density Difference</strong></p><p>Query the difference between the maximum and minimum populations in <strong>CITY</strong>.</p><p><strong>Input Format</strong></p><p>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*jltrdbyzRsiddKiG.jpg" /></figure><p>Solution:</p><pre>select max(population)-min(population) from city;</pre><p><strong>7. The Blunder</strong></p><p>Samantha was tasked with calculating the average monthly salaries for all employees in the <strong>EMPLOYEES</strong> table, but did not realize her keyboard’s 0 key was broken until after completing the calculation. She wants your help finding the difference between her miscalculation (using salaries with any zeros removed), and the actual average salary.</p><p>Write a query calculating the amount of error (i.e.: actual — miscalculated average monthly salaries), and round it up to the next integer.</p><p><strong>Input Format</strong></p><p>The <strong>EMPLOYEES</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/0*8EH6pIpbwzm9IWft.png" /></figure><p><strong>Note:</strong> Salary is per month.</p><p><strong>Sample Input</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/0*IMkJ9zSkZ92BpZ03.png" /></figure><p><strong>Sample Output</strong></p><pre>2061</pre><p>Solution:</p><pre>select ceil(avg(salary)-avg(replace(salary,&#39;0&#39;,&#39;&#39;))) from employees;</pre><p><strong>8. Top Earners</strong></p><p>We define an employee’s total earnings to be their monthly salary*months worked, and the maximum total earnings to be the maximum total earnings for any employee in the <strong>Employee</strong> table. Write a query to find the maximum total earnings for all employees as well as the total number of employees who have maximum total earnings. Then print these values as 2 space-separated integers.</p><p><strong>Input Format</strong></p><p>The <strong>Employee</strong> table containing employee data for a company is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/191/0*Q3GklKgNs8F-WlQN.png" /></figure><p>where employee_id is an employee’s ID number, name is their name, months is the total number of months they’ve been working for the company, and salary is the their monthly salary.</p><p><strong>Sample Input</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/0*ETBDptzqZBPl05AM.png" /></figure><p><strong>Sample Output</strong></p><pre>69952 1</pre><p>Solution:</p><pre>select salary*months , count(*) from employee<br>group by salary*months order by salary*months desc limit 1;</pre><p><strong>9. Weather Observation Station 2</strong></p><p>Query the following two values from the <strong>STATION</strong> table:</p><ol><li>The sum of all values in LAT_N rounded to a scale of 2 decimal places.</li><li>The sum of all values in LONG_W rounded to a scale of 2 decimal places.</li></ol><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*dmnIUTwyNUzo2FZi.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p><strong>Output Format</strong></p><p>Your results must be in the form:</p><pre>lat lon</pre><p>Solution:</p><pre>select round(sum(lat_n),2), round(sum(long_w),2) from station;</pre><p><strong>10. Weather Observation Station 13</strong></p><p>Query the sum of Northern Latitudes (LAT_N) from <strong>STATION</strong> having values greater than 38.7880 and less than 137.2345. Truncate your answer to 4 decimal places.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*zTFfQAbuPQIVgTQ6.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>select round(sum(lat_n),4) from station where lat_n&gt;38.7880 and lat_n&lt;137.2345;</pre><p><strong>11. Weather Observation Station 14</strong></p><p>Query the greatest value of the Northern Latitudes (LAT_N) from <strong>STATION</strong> that is less than 137.2345. Truncate your answer to 4 decimal places.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*8d1pkqy6cznHf5Dx.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>select round(max(lat_n),4) from station where lat_n&lt;137.2345;</pre><p><strong>12. Weather Observation Station 15</strong></p><p>Query the Western Longitude (LONG_W) for the largest Northern Latitude (LAT_N) in <strong>STATION</strong> that is less than 137.2345. Round your answer to 4 decimal places.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*GdIXI9nffIh44_TL.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>SELECT ROUND(LONG_W,4)<br>FROM STATION<br>WHERE LAT_N = (SELECT MAX(LAT_N) FROM STATION WHERE LAT_N &lt; 137.2345);</pre><p><strong>13. Weather Observation Station 16</strong></p><p>Query the smallest Northern Latitude (LAT_N) from <strong>STATION</strong> that is greater than 38.7780. Round your answer to 4 decimal places.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*wY18uO63zswqSdw9.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>select round(lat_n,4) from station where lat_n&gt;38.7780 order by 1 limit 1;</pre><p><strong>14. Weather Observation Station 17</strong></p><p>Query the Western Longitude (LONG_W)where the smallest Northern Latitude (LAT_N) in <strong>STATION</strong> is greater than 38.7780. Round your answer to 4 decimal places.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*CIW8A7m4aIwR06PD.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>select round(long_w,4) from station where lat_n&gt;38.7780 order by lat_n limit 1;</pre><p><strong>15. Weather Observation Station 18</strong></p><p>Consider P1(a,b) and P2(c,d) to be two points on a 2D plane.</p><ul><li>a happens to equal the minimum value in Northern Latitude (LAT_N in <strong>STATION</strong>).</li><li>b happens to equal the minimum value in Western Longitude (LONG_W in <strong>STATION</strong>).</li><li>c happens to equal the maximum value in Northern Latitude (LAT_N in <strong>STATION</strong>).</li><li>d happens to equal the maximum value in Western Longitude (LONG_W in <strong>STATION</strong>).</li></ul><p>Query the <a href="https://xlinux.nist.gov/dads/HTML/manhattanDistance.html">Manhattan Distance</a> between points P1 and P2 and round it to a scale of 4 decimal places.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*yCQhjeijt4BLrrZk.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>SELECT ROUND((MAX(LAT_N) - MIN(LAT_N) + MAX(LONG_W) - MIN(LONG_W)), 4) AS D<br>FROM STATION</pre><p><strong>16. Weather Observation Station 19</strong></p><p>Consider P1(a,b) and P2(c,d) to be two points on a 2D plane where (a,b) are the respective minimum and maximum values of Northern Latitude (LAT_N) and (c,d) are the respective minimum and maximum values of Western Longitude (LONG_W) in <strong>STATION</strong>.</p><p>Query the <a href="https://en.wikipedia.org/wiki/Euclidean_distance">Euclidean Distance</a> between points P1 and P2 and format your answer to display 4 decimal digits.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*F2EovJnajvLjVKyP.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>select round(sqrt(power(max(LAT_N) - min(LAT_N), 2) + power(max(LONG_W) - min(LONG_W), 2)), 4)<br>FROM STATION;</pre><p><strong>17. Weather Observation Station 20</strong></p><p>A <a href="https://en.wikipedia.org/wiki/Median">median</a> is defined as a number separating the higher half of a data set from the lower half. Query the median of the Northern Latitudes (LAT_N) from <strong>STATION</strong> and round your answer to 4 decimal places.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*763Yib4s3unFnN7e.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>SELECT ROUND(LAT_N, 4) AS median <br>FROM (SELECT LAT_N,  ROW_NUMBER() OVER (ORDER BY LAT_N) AS rn_asc, ROW_NUMBER() OVER (ORDER BY LAT_N DESC) AS rn_desc FROM STATION) AS subquery <br>WHERE rn_asc = rn_desc OR rn_asc + 1 = rn_desc OR rn_asc = rn_desc + 1;</pre><p>Hope this was helpful!</p><p>Do let me know if any code could be optimized or written better. Let’s learn and grow together.</p><p>Follow for more ❤, Thanks :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=befcf0a10878" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HackerRank SQL Practice- Advanced Select]]></title>
            <link>https://medium.com/@pnikhitha01/hackerrank-sql-practice-advanced-select-8a53107f93ec?source=rss-4055fd72d418------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a53107f93ec</guid>
            <category><![CDATA[advanced]]></category>
            <category><![CDATA[select-statement]]></category>
            <category><![CDATA[hackerrank-solutions-sql]]></category>
            <category><![CDATA[hackerrank]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Nikhitha Perapola]]></dc:creator>
            <pubDate>Fri, 04 Aug 2023 13:23:18 GMT</pubDate>
            <atom:updated>2023-08-04T13:23:18.257Z</atom:updated>
            <content:encoded><![CDATA[<ol><li><strong>Type of Triangle</strong></li></ol><p>Write a query identifying the type of each record in the <strong>TRIANGLES</strong> table using its three side lengths. Output one of the following statements for each record in the table:</p><ul><li><strong>Equilateral</strong>: It’s a triangle with 3 sides of equal length.</li><li><strong>Isosceles</strong>: It’s a triangle with 2 sides of equal length.</li><li><strong>Scalene</strong>: It’s a triangle with 3 sides of differing lengths.</li><li><strong>Not A Triangle</strong>: The given values of A, B, and C don’t form a triangle.</li></ul><p><strong>Input Format</strong></p><p>The <strong>TRIANGLES</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/0*5Ay179FEbRYrKxbL.png" /></figure><p>Each row in the table denotes the lengths of each of a triangle’s three sides.</p><p><strong>Sample Input</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/0*xcHxd2Gw4X6n4svn.png" /></figure><p><strong>Sample Output</strong></p><pre>Isosceles<br>Equilateral<br>Scalene<br>Not A Triangle</pre><p>Solution:</p><pre>select <br>case<br>when a+b &lt;= c then &#39;Not A Triangle&#39;<br>when a!=b and b!=c and c!=a  then &#39;Scalene&#39;<br>when a=b and b=c and c=a  then &#39;Equilateral&#39;<br>else &#39;Isosceles&#39; <br>end as &#39;Triangle&#39;<br>from triangles;</pre><p><strong>2. The PADS</strong></p><p>Generate the following two result sets:</p><ol><li>Query an alphabetically ordered list of all names in <strong>OCCUPATIONS</strong>, immediately followed by the first letter of each profession as a parenthetical (i.e.: enclosed in parentheses). For example: AnActorName(A), ADoctorName(D), AProfessorName(P), and ASingerName(S).</li><li>Query the number of occurrences of each occupation in <strong>OCCUPATIONS</strong>. Sort the occurrences in ascending order, and output them in the following format:</li></ol><ul><li>There are a total of [occupation_count] [occupation]s.</li></ul><ol><li>where [occupation_count] is the number of occurrences of occupation in <strong>OCCUPATIONS</strong> and [occupation] is the lowercase occupation name. If more than one Occupation has the same [occupation_count], they should be ordered alphabetically.</li></ol><p><strong>Note:</strong> There will be at least two entries in the table for each type of occupation.</p><p><strong>Input Format</strong></p><p>The <strong>OCCUPATIONS</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/0*1Fs3ZDid_t9GGOxI.png" /></figure><p>Occupation will only contain one of the following values: <strong>Doctor</strong>, <strong>Professor</strong>, <strong>Singer,</strong> or <strong>Actor</strong>.</p><p><strong>Sample Input</strong></p><p>An <strong>OCCUPATIONS</strong> table that contains the following records:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/0*pmMmk6LUekDMat6L.png" /></figure><p><strong>Sample Output</strong></p><pre>Ashely(P)<br>Christeen(P)<br>Jane(A)<br>Jenny(D)<br>Julia(A)<br>Ketty(P)<br>Maria(A)<br>Meera(S)<br>Priya(S)<br>Samantha(D)<br>There are a total of 2 doctors.<br>There are a total of 2 singers.<br>There are a total of 3 actors.<br>There are a total of 3 professors.</pre><p>Solution:</p><pre>SELECT (name || &#39;(&#39; || SUBSTR(occupation,1,1) || &#39;)&#39;) FROM occupations ORDER BY name;<br>SELECT (&#39;There are a total of &#39; || COUNT(occupation) || &#39; &#39; || LOWER(occupation) || &#39;s&#39; || &#39;.&#39;) FROM occupations GROUP BY occupation ORDER BY COUNT(occupation), occupation ASC;</pre><p><strong>3. Occupations</strong></p><p><a href="https://en.wikipedia.org/wiki/Pivot_table">Pivot</a> the Occupation column in <strong>OCCUPATIONS</strong> so that each Name is sorted alphabetically and displayed underneath its corresponding Occupation. The output column headers should be Doctor, Professor, Singer, and Actor, respectively.</p><p><strong>Note:</strong> Print <strong>NULL</strong> when there are no more names corresponding to an occupation.</p><p><strong>Input Format</strong></p><p>The <strong>OCCUPATIONS</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/0*znYXB0jSKaclLLlp.png" /></figure><p>Occupation will only contain one of the following values: <strong>Doctor</strong>, <strong>Professor</strong>, <strong>Singer,</strong> or <strong>Actor</strong>.</p><p><strong>Sample Input</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/0*6VUxDzb3f4OteY9Y.png" /></figure><p><strong>Sample Output</strong></p><pre>Jenny    Ashley     Meera  Jane<br>Samantha Christeen  Priya  Julia<br>NULL     Ketty      NULL   Maria</pre><p><strong>Explanation</strong></p><p>The first column is an alphabetically ordered list of Doctor names.<br>The second column is an alphabetically ordered list of Professor names.<br>The third column is an alphabetically ordered list of Singer names.<br>The fourth column is an alphabetically ordered list of Actor names.<br>The empty cell data for columns with less than the maximum number of names per occupation (in this case, the Professor and Actor columns) are filled with <strong>NULL</strong> values.</p><p>Solution:</p><pre>SELECT Doctor, Professor, Singer, Actor FROM (SELECT ROW_NUMBER() OVER (PARTITION BY occupation ORDER BY name) as rn, name, occupation FROM occupations) PIVOT (MAX(name) FOR occupation IN (&#39;Doctor&#39; as Doctor,&#39;Professor&#39; as Professor, &#39;Singer&#39; as Singer, &#39;Actor&#39; as Actor)) ORDER BY rn;</pre><p><strong>4. Binary Tree Nodes</strong></p><p>You are given a table, BST, containing two columns: N and P, where N represents the value of a node in a Binary Tree, and P is the parent of N.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/0*JojfVDSL5Mt4WIRl.png" /></figure><p>Write a query to find the node type of Binary Tree ordered by the value of the node. Output one of the following for each node:</p><ul><li>Root: If the node is a root node.</li><li>Leaf: If the node is a leaf node.</li><li>Inner: If the node is neither root nor leaf node.</li></ul><p><strong>Sample Input</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/0*9pZ8v81_F_c8Q_YX.png" /></figure><p><strong>Sample Output</strong></p><pre>1 Leaf<br>2 Inner<br>3 Leaf<br>5 Root<br>6 Leaf<br>8 Inner<br>9 Leaf</pre><p><strong>Explanation</strong></p><p>The Binary Tree below illustrates the sample:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/0*Esnhw06JhfvwyV6A.png" /></figure><p>Solution:</p><pre>select n,<br>case when p is null then &#39;Root&#39;<br>when n in (select p from bst) then &#39;Inner&#39;<br>else &#39;Leaf&#39; end from bst order by 1;</pre><p><strong>5. New Companies</strong></p><p>Amber’s conglomerate corporation just acquired some new companies. Each of the companies follows this hierarchy:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/113/0*AWcT_I5BgDIFqT5h.png" /></figure><p>Given the table schemas below, write a query to print the company_code, founder name, the total number of lead managers, the total number of senior managers, the total number of managers, and the total number of employees. Order your output by ascending company_code.</p><p><strong>Note:</strong></p><ul><li>The tables may contain duplicate records.</li><li>The company_code is a string, so the sorting should not be <strong>numeric</strong>. For example, if the company_codes are C_1, C_2, and C_10, then the ascending company_codes will be C_1, C_10, and C_2.</li></ul><p><strong>Input Format</strong></p><p>The following tables contain company data:</p><ul><li>Company: The company_code is the code of the company and the founder is the founder of the company.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/196/0*hlNit7kH4sLejll9.png" /></figure><ul><li>Lead_Manager: The lead_manager_code is the code of the lead manager, and the company_code is the code of the working company.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/0*J_A0WkIniIS0dKNs.png" /></figure><ul><li>Senior_Manager: The senior_manager_code is the code of the senior manager, the lead_manager_code is the code of its lead manager, and the company_code is the code of the working company.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/0*oZyTsOADJouQRHrS.png" /></figure><ul><li>Manager: The manager_code is the code of the manager, the senior_manager_code is the code of its senior manager, the lead_manager_code is the code of its lead manager, and the company_code is the code of the working company.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/243/0*3SC964rixRW4PhJ6.png" /></figure><ul><li>Employee: The employee_code is the code of the employee, the manager_code is the code of its manager, the senior_manager_code is the code of its senior manager, the lead_manager_code is the code of its lead manager, and the company_code is the code of the working company.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/0*wrlrUywy0bkTLnKE.png" /></figure><p><strong>Sample Input</strong></p><p>Company Table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/0*rvuTvsGbN85mvdEe.png" /></figure><p>Lead_Manager Table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/0*PXxynlXKYf73Qm9b.png" /></figure><p>Senior_Manager Table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/0*sgFi6CPT8sTnyeUJ.png" /></figure><p>Manager Table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/0*sJ96aRpl2fS9Lt9y.png" /></figure><p>Employee Table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/0*i6CQSBCxKKT2fvBe.png" /></figure><p><strong>Sample Output</strong></p><pre>C1 Monika 1 2 1 2<br>C2 Samantha 1 1 2 2</pre><p><strong>Explanation</strong></p><p>In company C1, the only lead manager is LM1. There are two senior managers, SM1 and SM2, under LM1. There is one manager, M1, under senior manager SM1. There are two employees, E1 and E2, under manager M1.</p><p>In company C2, the only lead manager is LM2. There is one senior manager, SM3, under LM2. There are two managers, M2 and M3, under senior manager SM3. There is one employee, E3, under Manager M2, and another employee, E4, under Manager, M3.</p><p>Solution:</p><pre>SELECT c.Company_Code, c.founder, count(Distinct e.Lead_Manager_Code), <br>count(distinct e.Senior_Manager_Code), count(distinct e.Manager_Code), <br>count(distinct e.employee_Code) FROM Company c <br>JOIN Employee e ON c.Company_Code = e.Company_Code GROUP BY c.Company_Code, c.Founder ORDER BY c.COMpany_Code;</pre><p>Hope this was helpful!</p><p>Even though this section has only 5 questions, It was challenging and interesting.</p><p>Do let me know if any code could be optimized or written better. Let’s learn and grow together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a53107f93ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HackerRank SQL Practice -Basic Select]]></title>
            <link>https://medium.com/@pnikhitha01/hackerrank-sql-practice-basic-select-a6d43a605122?source=rss-4055fd72d418------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6d43a605122</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[hackerrank-solutions-sql]]></category>
            <category><![CDATA[hackerrank]]></category>
            <category><![CDATA[select-statement]]></category>
            <dc:creator><![CDATA[Nikhitha Perapola]]></dc:creator>
            <pubDate>Sun, 30 Jul 2023 08:57:31 GMT</pubDate>
            <atom:updated>2023-07-30T09:11:13.250Z</atom:updated>
            <content:encoded><![CDATA[<h4>— Nikhitha Perapola</h4><ol><li><strong>Revising the Select Query I</strong></li></ol><p>Query all columns for all American cities in the <strong>CITY</strong> table with populations larger than 100000. The <strong>CountryCode</strong> for America is USA.</p><p>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*E70o9vc2ly_rSKF1.jpg" /></figure><p>Solution:</p><pre>select * from city where countrycode = &#39;USA&#39; and population&gt;100000;</pre><p><strong>2. Revising the Select Query II</strong></p><p>Query the <strong>NAME</strong> field for all American cities in the <strong>CITY</strong> table with populations larger than 120000. The CountryCode for America is USA.</p><p>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*1bkpJoU7AsxEkNNh.jpg" /></figure><p>Solution:</p><pre>select name from city where countrycode = &#39;USA&#39; and population &gt; 120000;</pre><p><strong>3. Select All</strong></p><p>Query all columns (attributes) for every row in the <strong>CITY</strong> table.</p><p>The <strong>CITY</strong> table is described as follows:</p><p>Query all columns (attributes) for every row in the <strong>CITY</strong> table.</p><p>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*YC0DsFolLjPAsD3M.jpg" /></figure><p>Solution:</p><pre>select * from city;</pre><p><strong>4. Select by ID:</strong></p><p>Query all columns for a city in <strong>CITY</strong> with the ID 1661.</p><p>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*XuITI8DHidddoyd9.jpg" /></figure><p>Solution:</p><pre>select * from city where id = 1661;</pre><p><strong>5. Japanese Cities’ Attributes</strong></p><p>Query all attributes of every Japanese city in the <strong>CITY</strong> table. The <strong>COUNTRYCODE</strong> for Japan is JPN.</p><p>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*T7S6fbZDfUG7RMq9.jpg" /></figure><p>Solution:</p><pre>select * from city where countrycode = &#39;JPN&#39;;</pre><p><strong>6. Japanese Cities’ Names</strong></p><p>Query the names of all the Japanese cities in the <strong>CITY</strong> table. The <strong>COUNTRYCODE</strong> for Japan is JPN.<br>The <strong>CITY</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*IiOLHuxsLKbum1zE.jpg" /></figure><p>Solution:</p><pre>select name from city where countrycode = &#39;JPN&#39;;</pre><p><strong>7. Weather Observation Station 1</strong></p><p>Query a list of <strong>CITY</strong> and <strong>STATE</strong> from the <strong>STATION</strong> table.<br>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*c-sKBt1qzLDEFvCi.jpg" /></figure><p>where <strong>LAT_N</strong> is the northern latitude and <strong>LONG_W</strong> is the western longitude.</p><p>Solution:</p><pre>select city,state from station;</pre><p><strong>8. Weather Observation Station 3</strong></p><p>Query a list of <strong>CITY</strong> names from <strong>STATION</strong> for cities that have an even <strong>ID</strong> number. Print the results in any order, but exclude duplicates from the answer.<br>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*RwafMXxINqWY6ps0.jpg" /></figure><p>where <strong>LAT_N</strong> is the northern latitude and <strong>LONG_W</strong> is the western longitude.</p><p>Solutions:</p><pre>select distinct(city) from station where mod(id,2)=0 order by 1;</pre><p><strong>9. Weather Observation Station 4</strong></p><p>Find the difference between the total number of <strong>CITY</strong> entries in the table and the number of distinct <strong>CITY</strong> entries in the table.<br>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*sxMd5D-yCa9R9LOG.jpg" /></figure><p>where <strong>LAT_N</strong> is the northern latitude and <strong>LONG_W</strong> is the western longitude.</p><p>Solution:</p><pre>select count(city) - count(distinct(city)) from station;</pre><p><strong>10. Weather Observation Station 5</strong></p><p>Query the two cities in <strong>STATION</strong> with the shortest and longest CITY names, as well as their respective lengths (i.e.: number of characters in the name). If there is more than one smallest or largest city, choose the one that comes first when ordered alphabetically.<br>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*Z9zbs-PCblc5lW4s.jpg" /></figure><p>where <strong>LAT_N</strong> is the northern latitude and <strong>LONG_W</strong> is the western longitude.</p><p><strong>Sample Input</strong></p><p>For example, <strong>CITY</strong> has four entries: <strong>DEF, ABC, PQRS,</strong> and <strong>WXY</strong>.</p><p><strong>Sample Output</strong></p><pre>ABC 3<br>PQRS 4</pre><p><strong>Explanation</strong></p><p>When ordered alphabetically, the <strong>CITY</strong> names are listed as <strong>ABC, DEF, PQRS,</strong> and <strong>WXY</strong>, with lengths 3,3,4, and 3. The longest name is <strong>PQRS</strong>, but there are 3 options for the shortest-named city. Choose <strong>ABC</strong>, because it comes first alphabetically.</p><p>Solution:</p><pre>select CITY,LENGTH(CITY) from STATION order by Length(CITY) asc, CITY limit 1; <br>select CITY,LENGTH(CITY) from STATION order by Length(CITY) desc, CITY limit 1;</pre><p><strong>11. Weather Observation Station 6</strong></p><p>Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from <strong>STATION</strong>. Your result cannot contain duplicates.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*7fXTIexgPjMHGOJT.jpg" /></figure><p>Solution:</p><pre>SELECT CITY FROM STATION where SUBSTR(CITY,1,1) IN(&#39;A&#39;,&#39;E&#39;,&#39;I&#39;,&#39;O&#39;,&#39;U&#39;);</pre><p><strong>12. Weather Observation Station 7</strong></p><p>Query the list of CITY names ending with vowels (a, e, i, o, u) from <strong>STATION</strong>. Your result cannot contain duplicates.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*qB8HDHQQ85V62IQj.jpg" /></figure><p>Solution:</p><pre>SELECT distinct(CITY) FROM STATION where city like &#39;%[aeiou]&#39; order by 1;</pre><p><strong>13. Weather Observation Station 8</strong></p><p>Query the list of CITY names from <strong>STATION</strong> that have vowels (i.e., a, e, i, o, and u) as both their first and last characters. Your result cannot contain duplicates.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*JdzNIQNd9mbSGTF9.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>SELECT CITY FROM STATION where city like &#39;[aeiou]%[aeiou]&#39;;</pre><p><strong>14. Weather Observation Station 9</strong></p><p>Query the list of CITY names from <strong>STATION</strong> that do not start with vowels. Your result cannot contain duplicates.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*vslNes1E88g9Fvs-.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>SELECT distinct(CITY) FROM STATION where city not like &#39;[aeiou]%&#39;;</pre><p><strong>15. Weather Observation Station 10</strong></p><p>Query the list of CITY names from <strong>STATION</strong> that do not end with vowels. Your result cannot contain duplicates.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*FL0bs79-R0_otXo0.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>SELECT distinct(CITY) FROM STATION where city not like &#39;%[aeiou]&#39;;</pre><p><strong>16. Weather Observation Station 11</strong></p><p>Query the list of CITY names from <strong>STATION</strong> that either do not start with vowels or do not end with vowels. Your result cannot contain duplicates.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*vKrJJrSocMjblOrq.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>SELECT distinct(CITY) FROM STATION where city not like &#39;[aeiou]%[aeiou]&#39;;</pre><p><strong>17. Weather Observation Station 12</strong></p><p>Query the list of CITY names from <strong>STATION</strong> that do not start with vowels and do not end with vowels. Your result cannot contain duplicates.</p><p><strong>Input Format</strong></p><p>The <strong>STATION</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*VZetzM7mlPtsRKap.jpg" /></figure><p>where LAT_N is the northern latitude and LONG_W is the western longitude.</p><p>Solution:</p><pre>select distinct(city) from station where city not like &#39;[aeiou]%&#39; and city not like &#39;%[aeiou]&#39;</pre><p><strong>18. Higher Than 75 Marks</strong></p><p>Query the Name of any student in <strong>STUDENTS</strong> who scored higher than 75 Marks. Order your output by the last three characters of each name. If two or more students both have names ending in the same last three characters (i.e.: Bobby, Robby, etc.), secondary sort them by ascending ID.</p><p><strong>Input Format</strong></p><p>The <strong>STUDENTS</strong> table is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/0*n3CaireM7aZ5eyq1.png" /></figure><p>The Name column only contains uppercase (A-Z) and lowercase (a-z) letters.</p><p><strong>Sample Input</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/0*XQhq6U49XLU5IYHr.png" /></figure><p><strong>Sample Output</strong></p><pre>Ashley<br>Julia<br>Belvet</pre><p><strong>Explanation</strong></p><p>Only Ashley, Julia, and Belvet have Marks &gt; 75. If you look at the last three characters of each of their names, there are no duplicates and ‘ley’ &lt; ‘lia’ &lt; ‘vet’.</p><p>Solution:</p><pre>select name from students where marks&gt;75 order by substr(name,-3,3);</pre><p><strong>19. Employee Names</strong></p><p>Write a query that prints a list of employee names (i.e.: the name attribute) from the <strong>Employee</strong> table in alphabetical order.</p><p><strong>Input Format</strong></p><p>The <strong>Employee</strong> table containing employee data for a company is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/191/0*xcyCJpNC1yzeDmIF.png" /></figure><p>where employee_id is an employee’s ID number, the name is their name, months is the total number of months they’ve been working for the company, and salary is their monthly salary.</p><p><strong>Sample Input</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/0*q2gtUs9FPyrM59xI.png" /></figure><p><strong>Sample Output</strong></p><pre>Angela<br>Bonnie<br>Frank<br>Joe<br>Kimberly<br>Lisa<br>Michael<br>Patrick<br>Rose<br>Todd</pre><p>Solution:</p><pre>select name from employee order by 1;</pre><p><strong>20. Employee Salaries</strong></p><p>Write a query that prints a list of employee names (i.e.: the name attribute) for employees in <strong>Employee</strong> having a salary greater than $2000 per month who have been employees for less than 10 months. Sort your result by ascending employee_id.</p><p><strong>Input Format</strong></p><p>The <strong>Employee</strong> table containing employee data for a company is described as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/191/0*ln-QQeYD5rVwrtRY.png" /></figure><p>where employee_id is an employee’s ID number, the name is their name, months is the total number of months they’ve been working for the company, and salary is their monthly salary.</p><p><strong>Sample Input</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/0*WP-2cxx18_Aivmd8.png" /></figure><p><strong>Sample Output</strong></p><pre>Angela<br>Michael<br>Todd<br>Joe</pre><p><strong>Explanation</strong></p><p>Angela has been an employee for months and earns $3443 per month.</p><p>Michael has been an employee for months and earns $2017 per month.</p><p>Todd has been an employee for months and earns $3396 per month.</p><p>Joe has been an employee for months and earns $3573 per month.</p><p>We order our output by ascending employee_id.</p><p>Solution:</p><pre>select name from employee where salary&gt;2000 and months&lt;10 order by employee_id;</pre><p>Hope this was helpful!</p><p>Do let me know if any code could be optimized or written better. Let’s learn and grow together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6d43a605122" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>