HackerRank Sql

Weather Observation Station 1 query in SQL – Hacker Rank Solution

Problem Query a list of CITY and STATE from the STATION table.The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude Weather Observation Station 1 query in SQL – Hacker Rank Solution Disclaimer: The above Problem (Weather Observation Station 1 query in SQL ) generated by Hackerrank but the Solution is Provided by codeworld19 . This tutorial is only for Educational and Learning purposes. Authority …

Weather Observation Station 1 query in SQL – Hacker Rank Solution Read More »

Weather Observation Station 3 query in SQL – Hacker Rank Solution

Problem Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer.The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. Weather Observation Station 3 query in SQL – Hacker Rank Solution Disclaimer: The above Problem (Weather Observation Station 3 query in SQL …

Weather Observation Station 3 query in SQL – Hacker Rank Solution Read More »

Top Earners sql – Hacker Rank Solution

Problem We define an employee’s total earnings to be their monthly  worked, and the maximum total earnings to be the maximum total earnings for any employee in the Employee 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  space-separated integers. Input Format The Employee table …

Top Earners sql – Hacker Rank Solution Read More »

Weather Observation Station 4 query in SQL – Hacker Rank Solution

Problem Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table.The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. For example, if there are three records in the table with CITY values ‘New York’, ‘New York’, ‘Bengalaru’, there are 2 different city names: ‘New …

Weather Observation Station 4 query in SQL – Hacker Rank Solution Read More »

Weather Observation Station 5 in SQL – Hacker Rank Solution

Problem Query the two cities in STATION 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.The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. Sample …

Weather Observation Station 5 in SQL – Hacker Rank Solution Read More »

Weather Observation Station 2 sql – Hacker Rank Solution

Problem Query the following two values from the STATION table: The sum of all values in LAT_N rounded to a scale of 2 decimal places. The sum of all values in LONG_W rounded to a scale of 2 decimal places. Input Format The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. Output Format Your results must be in the form: where  is …

Weather Observation Station 2 sql – Hacker Rank Solution Read More »