Student Information and Examination Marks Query

This SQL query is designed to extract specific student information based on their examination marks. It focuses on students whose total marks for three subjects are less than 100. The data is retrieved from two tables: 'student_information' and 'examination_marks'. These tables are joined on the 'roll_number' field, which is a common identifier for students in both tables.

Secure your next interview 🎯

CodeRankGPT is a tool powered by GPT-4 that quietly assists you during your coding interview, providing the solutions you need.
In real-time and absolutely undetectable 🥷

Here is the Student Information and Examination Marks Query from HackerRank using CodeRankGPT:

The SQL query works by performing an INNER JOIN operation on the 'student_information' and 'examination_marks' tables. The join is based on the 'roll_number' field, ensuring that only records with a matching roll number in both tables are included. The query then groups the results by 'roll_number', ensuring that each student's information is grouped together. The HAVING clause is used to filter the results, only including students whose total marks for 'subject_one', 'subject_two', and 'subject_three' are less than 100. The SUM function is used to calculate the total marks for each student.


SELECT a.roll_number,a.name FROM student_information as a INNER JOIN examination_marks as 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;

If you have a HackerRank Certification test or a coding interview coming up, you can use CodeRankGPT to your advantage. It will assist you during your test and help ensure you get the certification or the job.

AI is here now, and other candidates might be using it to get ahead and win the job. 🧐

Built on Unicorn Platform