Select the correct answerFollowing schema is given for university relation(Table):university(student_code, first_name, last_name, email, phone_no, date_of_birth, honours_subject, percentage_of_marks);Which of the following query would display names of all students in descending order of percentage of marks?Optionsselect first_name, last name, percentage_of_marks order by percentage_of_marks desc from university;select first_name, last name, percentage_of_marks from university order by percentage_of_marks;select first_name, last name, percentage_of_marks from university order by percentage_of_marks desc;select first_name, last name, percentage_of_marks from university order by percentage_of_marks descending;
Question
Select the correct answerFollowing schema is given for university relation(Table):university(student_code, first_name, last_name, email, phone_no, date_of_birth, honours_subject, percentage_of_marks);Which of the following query would display names of all students in descending order of percentage of marks?Optionsselect first_name, last name, percentage_of_marks order by percentage_of_marks desc from university;select first_name, last name, percentage_of_marks from university order by percentage_of_marks;select first_name, last name, percentage_of_marks from university order by percentage_of_marks desc;select first_name, last name, percentage_of_marks from university order by percentage_of_marks descending;
Solution
The correct query to display the names of all students in descending order of percentage of marks is:
select first_name, last_name, percentage_of_marks from university order by percentage_of_marks desc;
Similar Questions
Select the correct answerFollowing schema is given for university relation(Table):university(student_code, first_name, last_name, email, phone_no, date_of_birth, honours_subject, percentage_of_marks);Which of the following query would display the distinct honours subjects in the university table?Optionsselect distinct honours_subject from university;select honours_subject from university;No query is correctselect all honours_subject distinct from university;select * distinct from university;
Given 3 tables, students(id, name) , courses(id, name) , grades(id, course_id, student_id, grade), for each student, get all the courses that he/she is enrolled in along with the grade he/she scored for each course. Order the result by the student name in ascending order and if there is a tie, break it with the course name in ascending order and if there is a tie break it with the grade in ascending order. Your query should output a table with the following columns (name, course, grade).
Students Table Surname First_Name Student_No Dept_No Year Duke Fitzroy 1 4 2Al-Essawy Zaid 2 4 2Ayton Phil 3 3 1Patel Mahesh 4 2 1Jones Gareth 5 2 1Scott Gavin 6 2 2CREATE VIEW Freshman AS Select * From Students Where Year = 1;Considering the above Students table and Freshman view, what will be the result of the following SQL query:Select * From Freshman Where Dept_No=4;Question 6Select one:a. Surname First_Name Student_No Dept_No Year Ayton Phil 3 3 1Patel Mahesh 4 2 1Jones Gareth 5 2 1b. Surname First_Name Student_No Dept_No Year Duke Fitzroy 1 4 2Al-Essawy Zaid 2 4 2c. Surname First_Name Student_No Dept_No Year Duke Fitzroy 1 4 2d.None of the above
You have created a query to list information from the students table:SELECT student_id, grade_point_average FROM students ORDER BY grade_point_averageA partial result is shown below:Student_idgrade_point_average12344.015473.918763.929343.897253.883203.420433.339483.0You want the results to look like this:Student_idgrade_point_average12344.015473.918763.929343.897253.8You begin revising your query:SELECT student_id, grade_point_average FROM students ORDER BY grade_point_average ______ 5What should you type in the blank space? (Please type your answer all in upper case. Example: SELECT)
Given 3 tables, students(id, name) , courses(id, name) , grades(id, course_id, student_id, grade), find the name of the most popular course (the one with the most enrolled students and students should be passing, i.e. achieving a grade of at least 50) and if there is a tie, get the course name that's lexicographically smaller. Your query should output a table with the following columns (name)
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.