Skip to content

Commit dd3bc96

Browse files
committed
Added challenge 13
1 parent 59cb608 commit dd3bc96

File tree

18 files changed

+35562
-116
lines changed

18 files changed

+35562
-116
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from collections import Counter
2+
import sys
3+
4+
5+
S, T = sys.argv[1:]
6+
print(Counter(S) == Counter(T))

012-anagrams/test_cases.go

Lines changed: 0 additions & 116 deletions
This file was deleted.

013-cars/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Welcome @Challengers to the **13th** #code4bytes challenge!
2+
3+
Today we are roleplaying as veteran data scientists for the website called "automobiletrader.com". Our bosses have asked us to do some fine research into the cars that are currenly for sale on our website! Our friendly data engineering colleagues have given us a zip called `database_files.zip`, that contains the same data in 3 diffirent formats (because data engineers are so thoughtful and sweet!). Your task is to inspect the data, figure out a good table schema, import that data into a database and then answer the following 3 challenges the CEO had for us.
4+
5+
```
6+
Challenge 1:
7+
8+
Come up with a single SQL statement that gives us the price, model and year for every car of the ford brand.
9+
```
10+
```
11+
Challenge 2:
12+
13+
Come up with a single SQL statement that gives us the average mileage/price (mpp) per color of car.
14+
```
15+
```
16+
Challenge 3:
17+
18+
Come up with a single SQL statement that gives us the mean price and the standard deviation of the price of cars in California
19+
```
20+
**Sumbit your 3 separate SQL files! Not the results of them!**
21+
22+
Download the zip file here: https://frenchgirls.s3.eu-central-1.amazonaws.com/database_files.zip
23+
24+
- 1st place: 500.000 bytes!
25+
- 2nd place: 300.000 bytes!
26+
- 3rd place: 150.000 bytes!
27+
- Runner up: 75.000 bytes!
28+
29+
If you cannot complete all challenges, no worries. But I'll have to dock some of your bytes! Unless you completed all challenges, you can not submit for first, second or third place (but you can for runner up!). We will also deduct 25.000 bytes per challenge you did not do!
30+
31+
Good luck and have fun!

013-cars/base_solution.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT price, model, year FROM car.car WHERE brand = "ford";

013-cars/base_solution1.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
USE `car`;
2+
SELECT price, model, year FROM car WHERE brand = "ford";

013-cars/base_solution2.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SELECT (
2+
AVG(price),
3+
STD(price)
4+
FROM
5+
car.car
6+
WHERE
7+
state = "california";

013-cars/base_solution3.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SELECT
2+
color,
3+
AVG(price/mileage) AS ppm
4+
FROM
5+
car.car
6+
GROUP BY
7+
color;

013-cars/database_files/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This dataset belongs to Doaa Alsenani
2+
and can be found on Kaggle at the url:
3+
https://www.kaggle.com/doaaalsenani/usa-cers-dataset
4+
5+
no copyright infringement intended!
6+
for DMCA takedown please contact mathis.vaneetvelde@gmail.com

013-cars/database_files/car_202008301903.sql

Lines changed: 2999 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)