Assignment
This is a short questionnaire to assess your technical skills required for this role. Some of the questions may require you to write some code - please write as syntactically correct as possible in that case.
To keep this fair and square for all candidates, please don't use any devices to find the answers to these questions.
General
1. What is the difference between cause and correlation?
2. What is the difference between mean and median?
3. When would you present either the mean or the median value?
Databases and SQL
1. What does the JOIN command in SQL do?
2. Part of this position involves connecting to databases to extract data. What is/are your suggestion(s) for keeping passwords secure while doing so?
3. You have the following table in a MySQL database:
| id | name | parent |
| 1 | 'home' | 1 |
| 2 | ‘mobil' | 1 |
| 3 | ‘motor' | 1 |
| 147 | ‘toyota'| 2 |
| 160 | ‘bmw' | 2 |
| 301 | ‘honda' | 3 |
| 488 | ‘vespa' | 3 |
Write an SQL-query to produce the following output:
| id | category | subcategory |
| 147| ‘mobil' | ‘toyota' |
| 160| ‘mobil | ‘bmw' |
| 301| ‘motor' | ‘honda' |
| 488| ‘motor' | ‘vespa' |
Python
1. Assume you have managed to load the expected output from the previous question to a Pandas DataFrame (if you are not familiar with Pandas, show how you would load the output from a .csv file and continue with your preferred method). Write code that gives you only the rows where the category is ‘mobil'.
Expected output (no need to print):
| id | category | subcategory |
| 147| ‘mobil' | ‘toyota' |
| 160| ‘mobil' | ‘toyota' |
2. What is/are, in your opinion, the best and worst features in Python?