Skip to main content

Posts

Showing posts with the label DataBase

Average Population Hackerrank Solution SQL | Hackerrank SQL

 Average Population Hackerrank Solution SQL  For Explanation Watch Video:  Code:: select round(avg(population),0) from city;

Revising Aggregations - Averages Hackerrank Solution SQL | Hackerrank SQL

  Revising Aggregations - Averages Hackerrank Solution SQL  For Explanation Watch Video : Code:: select avg(population) from city where district = 'California';

Type of Triangle Hackerrank Solution SQL | Hackerrank SQL

 Type of Triangle Hackerrank Solution SQL  For Explanation Watch Video : Code: SELECT CASE WHEN A+B<=C OR B+C<=A OR C+A<=B THEN 'Not A Triangle' WHEN A=B AND B=C THEN 'Equilateral' WHEN A=B OR B=C OR C=A THEN 'Isosceles' ELSE 'Scalene' END FROM TRIANGLES;

Employee Salaries Hackerrank Solution SQL | Hackerrank SQL

 Employee Salaries Hackerrank Solution SQL For Explanation Watch Video:  Code: select name from Employee where salary>2000 and months < 10 order by employee_id;

Employee Names Hackerrank Solution SQL | Hackerrank SQL

Employee Names Hackerrank Solution SQL   For Explanation Watch Video : Code: select name from Employee order by name;

Higher Than 75 Marks Hackerrank Solution SQL | Hackerrank SQL

 Higher Than 75 Marks Hackerrank Solution SQL  for explanation watch Video: Code: select name from students where marks>75 order by substr(name,-3),id;

Weather Observation Station 12 Hackerrank Solution SQL | Hackerrank SQL

 Weather Observation Station 12 Hackerrank Solution SQL For Explanation Watch Videos:: Code: select distinct city from station where  not(city like 'A%' or city like 'E%' or city like 'I%' or city like 'O%' or city like 'U%') and not(city like '%A' or city like '%E' or city like '%I' or city like '%O' or city like '%U');

Weather Observation Station 11 Hackerrank Solution SQL | Hackerrank SQL

 Weather Observation Station 11 Hackerrank Solution SQL  For Explanation Watch video:: Code: select distinct city from station where not(city like 'A%' or city like 'E%' or city like 'I%' or city like 'O%' or city like 'U%') or not(city like '%A' or city like '%E' or city like '%I' or city like '%O' or city like '%U');

Weather Observation Station 10 Hackerrank Solution SQL | Hackerrank SQL

 Weather Observation Station 10 Hackerrank Solution SQL For Explanation Watch Video:: Code: select distinct city from station where not(city like '%A' or city like '%E' or city like '%I' or city like '%O' or city like '%U');

Weather Observation Station 9 Hackerrank Soluion SQL | Hackerrank SQL

 Weather Observation Station 9 Hackerrank Soluion SQL For Explanation Watch Video:: Code: select distinct city from station where not(city like 'A%' or city like 'E%' or city like 'I%' or city like 'O%' or city like 'U%');

Weather Observation Station 1 Hackerrank Solution SQL

 Weather Observation Station 1 Hackerrank Solution SQL For Explanation Watch Video: Code: select city,state from station;

Japanese Cities' Names Hackerrank Solution SQL

 Japanese Cities' Names Hackerrank Solution SQL for Explanation Watch video: Code: select name from city where  COUNTRYCODE ='JPN';

Japanese Cities' Attributes Hackerrank Solution SQL

 Japanese Cities' Attributes Hackerrank Solution SQL For Explanation watch video: Code: select * from city where COUNTRYCODE='JPN';

Select By ID Hackerrank Solution SQL

 Select By ID Hackerrank Solution SQL For Explanation Watch Video: Code: select * from city where id = 1661;

Select All Hackerrank Solution SQL

 Select All Hackerrank Solution SQL For Explanation Watch Video: Code: select * from city;

Revising the Select Query II Hackerrank Solution SQL

 Revising the Select Query II Hackerrank Solution SQL If You want Explanation Watch Video: Code: select name from city where population > 120000 and CountryCode = 'USA';

Day 28: RegEx, Patterns, and Intro to Databases Hackerrank Solution Java

 Day 28: RegEx, Patterns, and Intro to Databases  For Explanation Check Video: Sample Input 6 riya riya@gmail.com julia julia@julia.me julia sjulia@gmail.com julia julia@gmail.com samantha samantha@gmail.com tanya tanya@gmail.com Sample Output julia julia riya samantha tanya Code: import  java.io.*; import  java.math.*; import  java.security.*; import  java.text.*; import  java.util.*; import  java.util.concurrent.*; import  java.util.regex.*; public   class  Solution {      private   static   final  Scanner scanner =  new  Scanner(System.in);      public   static   void  main(String[] args) {          int  N = scanner.nextInt();         scanner.skip( "(\r\n|[\n\r\u2028\u2029\u0085])?" );         String reg =  ".+@gmail\\.com$" ;         Pattern p = Pattern.compile(reg);         ArrayList<String> al =  new  ArrayList<>();          for  ( int  NItr =  0 ; NItr < N; NItr++) {             String[] firstNameEmailID = scanner.nextLine().split( " "