Question: ( 5 marks ) Write a query to print the hacker _ id , name, and the number of distinct tasks each hacker participated in

(5 marks) Write a query to print the hacker_id, name, and the number of distinct tasks each hacker
participated in. Sort the result by the number of tasks in descending order, and then by hacker_id in ascending
order if theres a tie.
2.(5 marks) Write a query to find the task_id, description, and the total bonus awarded for each task. Sort the
result by task_id in ascending order.
3.(5 marks) Write a query to list the submission_id, hacker_id, name, and score of the highest-scoring
submission for each task submitted on 2023-01-01. If multiple submissions have the highest score for the same
task, return the submission with the smallest submission_id. Sort the result by task_id in ascending order.
4.(5 marks) Write a query to print the hacker_id, name, and the total score each hacker achieved across all
tasks. For each task, only the hacker's best score counts. Sort the result by total_score in descending order and
by hacker_id in ascending order if there's a tie.
5.(5 marks) Write a query to find the hacker_id, name, and bank_account of hackers who did not participate in
any tasks.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!