Issue
Consider a table consisting the marks of students in a mathematics test along with their unique student_id. Write a query to determine which students got the marks that is divisible by 10 and which students did not. Make sure that the output is ordered by student_id.
Solution
select *, case when mod(marks,10) = 0 then 'yes' else 'no' end as 'div_by_ten' from marks order by student_id;
Answered By - kundan kaushik Answer Checked By - David Marino (sql.easybugfix Volunteer)

Post a Comment
Post a Comment