In this blog post, you will find the HackerRank SQL Basic certification Solutions. This test was conducted on 15 September, 2023 and the questions are according to this date. The answers to questions are:-
![Hackerrank sql basic certification Solution](https://codeblockx.com/wp-content/uploads/2023/10/Codeblockx-Hackerrank-768x432.png)
HackerRank SQL Basic Certification Solution :-
Q1:- Student Advisor
SELECT roll_number,name
FROM student_information s
INNER JOIN faculty_information f
ON s.advisor = f.employee_ID
WHERE (f.gender = ‘M’ and f.salary>15000) or (f.gender = ‘F’ and f.salary>20000);
Q2:- Country Codes
Q3:- Merit Rewards
SELECT e.employee_ID, e.name
FROM employee_information e
JOIN last_quarter_bonus l ON l.employee_ID = e.employee_ID
WHERE e.division LIKE ‘HR’
AND l.bonus >= 5000;
Q4:- Profitable Stocks
SELECT p.stock_code
FROM price_today p
INNER JOIN price_tomorrow pt
ON p.stock_code = pt.stock_code
WHERE pt.price>p.price
ORDER BY stock_code asc;
Q5:- Student Analysis
SELECT a.roll_number,a.name
FROM student_information a
INNER JOIN examination_marks b
ON a.roll_number = b.roll_number
GROUP BY b.roll_number
HAVING SUM(b.subject_one + b.subject_two + b.subject_three) < 100;
Hope this blog post was helpful to you and you have got the answer to your question. Thank you for visiting our blog. If you have any doubts about any coding questions then let us know in the comments section we will answer them as soon as possible. Till then check out our more blog posts.