This SQL query selects the username, first name, middle name, last name and marks of users from the user and user_paper tables, where the user ID matches between the tables and the paper set is 3, and orders the results by marks in descending order.
1. SELECT username, first_name, middle_name, last_name, marks FROM `user_paper`,
`user` WHERE
user_paper.user_id = user.user_id and
user_paper.paper_set_name_id = 3
ORDER BY marks DESC