Skip to content

Commit b7b290a

Browse files
committed
Add Basic Aggregation Sql queries
1 parent 5620e3b commit b7b290a

File tree

6 files changed

+10
-2
lines changed

6 files changed

+10
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div align="center">
22
<img src="https://github.com/alexprut/HackerRank/raw/master/hackerrank-logo.png" width="450" height="auto"/>
33

4-
[![Solutions](https://img.shields.io/badge/solutions-428-green.svg?style=flat-square)](https://github.com/alexprut/HackerRank#table-of-contents)
4+
[![Solutions](https://img.shields.io/badge/solutions-434-green.svg?style=flat-square)](https://github.com/alexprut/HackerRank#table-of-contents)
55
[![Languages](https://img.shields.io/badge/languages-c%2B%2B%2Cjava%2Chaskell-yellow.svg)](https://github.com/alexprut/HackerRank#table-of-contents)
66
[![Author](https://img.shields.io/badge/author-alexprut-brightgreen.svg?style=flat-square)](https://www.hackerrank.com/alexprut)
77
[![MIT](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)](https://github.com/alexprut/HackerRank/blob/master/LICENSE)
@@ -537,6 +537,10 @@ platform tests of a given problem.
537537
|Basic Select|[Higher Than 75 Marks](https://www.hackerrank.com/challenges/more-than-75-marks)|Easy|15|[Solution.txt](Sql/Basic%20Select/Higher%20Than%2075%20Marks/Solution.txt)|
538538
|Basic Select|[Employee Names](https://www.hackerrank.com/challenges/name-of-employees)|Easy|10|[Solution.txt](Sql/Basic%20Select/Employee%20Names/Solution.txt)|
539539
|Basic Select|[Employee Salaries](https://www.hackerrank.com/challenges/salary-of-employees)|Easy|10|[Solution.txt](Sql/Basic%20Select/Employee%20Salaries/Solution.txt)|
540+
|Aggregation|[Revising Aggregations - The Sum Function](https://www.hackerrank.com/challenges/revising-aggregations-sum)|Easy|10|[Solution.txt](Sql/Aggregation/Revising%20Aggregations%20-%20The%20Sum%20Function/Solution.txt)|
541+
|Aggregation|[Revising Aggregations - Averages](https://www.hackerrank.com/challenges/revising-aggregations-the-average-function)|Easy|10|[Solution.txt](Sql/Aggregation/Revising%20Aggregations%20-%20Averages/Solution.txt)|
542+
|Aggregation|[Average Population](https://www.hackerrank.com/challenges/average-population)|Easy|10|[Solution.txt](Sql/Aggregation/Average%20Population/Solution.txt)|
543+
|Aggregation|[Japan Population](https://www.hackerrank.com/challenges/japan-population)|Easy|10|[Solution.txt](Sql/Aggregation/Japan%20Population/Solution.txt)|
540544

541545
License
542546
=======
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT ROUND(AVG(POPULATION), 0) FROM CITY
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT SUM(POPULATION) FROM CITY WHERE COUNTRYCODE = 'JPN'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT AVG(POPULATION) FROM CITY WHERE DISTRICT = 'California'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT SUM(POPULATION) FROM CITY WHERE DISTRICT = 'California'

script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function getList(domain, subDomain) {
1111
var score = item.find(".max-score").text().replace("Max Score: ", "");
1212
var link = "https://www.hackerrank.com" + item.attr("href");
1313
console.log(
14-
"|" +subDomain+ "|[" +title+ "](" +link+ ")|" +difficulty+ "|" +score+ "|[Solution.java](" +domain+ "/" +subDomain+ "/" +title+ "/Solution.java)|"
14+
"|" +subDomain+ "|[" +title+ "](" +link+ ")|" +difficulty+ "|" +score+ "|[Solution.java](" +domain.replace(/ /g,"%20") + "/" +subDomain.replace(/ /g,"%20")+ "/" +title.replace(/ /g,"%20")+ "/Solution.java)|"
1515
)
1616
})
1717
}

0 commit comments

Comments
 (0)