HackerRank SQL Basic Certification Solutions – FREE SQL Certification

Avatar for Azhar Khan

Here are the 4 questions asked in HackerRank SQL Basic Certification Exam, from these 2 will be available in one attempt.

Student analysis SQL solution-

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;

Country codes SQL solution

SELECT a.customer_id,a.name,concat("+",b.country_code,a.phone_number)FROM customers as aLEFT join country_codes as b ON a.country=b.countryORDER BY a.customer_id;

Student Advisor SQL solution in MYSQL

SELECT roll_number,name
FROM student_information a
INNER JOIN faculty_information b
ON a.advisor = b.employee_ID
WHERE (b.gender = 'M' and b.salary>15000) or (b.gender = 'F' and b.salary>20000);

Profitable Stocks SQL solution in MYSQL

SELECT a.stock_codeFROM price_today aINNER JOIN price_tomorrow bON a.stock_code = b.stock_codeWHERE b.price>a.priceORDER BY stock_code asc;

Merit Rewards

FROM employee_information ei
JOIN last_quarter_bonus b ON b.employee_ID = ei.employee_ID
WHERE ei.division LIKE 'HR'
AND b.bonus >= 5000;

The solution of HackerRank SQL Basic Certification problem student analysis and country code is shared for your increasing knowledge. Please don’t copy the the code . You can use the code to make your understand clear.

Leave a Reply

Your email address will not be published. Required fields are marked *

Next Post
HackerRank SQL Intermediate Certification

HackerRank SQL Intermediate Certification Solutions – FREE SQL Certification

Related Posts