Knowee
Questions
Features
Study Tools

ou have a database that tracks students in the students table by student_id. Students may get warnings for low grades or poor behavior. The warnings are tracked in the warnings table where the student is referred to by student_id.You need to create a query that finds the first and last name of the student who has the most records in the warnings table. You begin typing your query:What should you type in the blank space? (Please type your answer all in lower case. Example: select)

Question

ou have a database that tracks students in the students table by student_id. Students may get warnings for low grades or poor behavior. The warnings are tracked in the warnings table where the student is referred to by student_id.You need to create a query that finds the first and last name of the student who has the most records in the warnings table. You begin typing your query:What should you type in the blank space? (Please type your answer all in lower case. Example: select)

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

select students.first_name, students.last_name, count(warnings.student_id) as warning_count from students join warnings on students.student_id = warnings.student_id group by students.student_id order by warning_count desc limit 1

Similar Questions

You have a database that tracks students in the students table by student_id. The names of the semesters are in a semesters table where the primary key is semester_id. Each semester, students are assigned a grade_point_average which is stored in the grades table. The grades table lists the student_id and the semester_id in addition to the grade_point_average.You need to create a query that finds all the semesters where the student had a grade point average that was less than their average grade point average. You begin typing your query:What should you type in the blank space? (Please type your answer all in lower case. Example: select)

Write a MySQL statement to sort the students in descending order of the last name

ou are given two tables: Students and Grades. Students contains three columns ID, Name and Marks.Grades contains the following data:Ketty gives Eve a task to generate a report containing three columns: Name, Grade and Mark. Ketty doesn't want the NAMES of those students who received a grade lower than 8. The report must be in descending order by grade -- i.e. higher grades are entered first. If there is more than one student with the same grade (8-10) assigned to them, order those particular students by their name alphabetically. Finally, if the grade is lower than 8, use "NULL" as their name and list them by their grades in descending order. If there is more than one student with the same grade (1-7) assigned to them, order those particular students by their marks in ascending order.Write a query to help Eve.Sample InputSample OutputMaria 10 99Jane 9 81Julia 9 88 Scarlet 8 78NULL 7 63NULL 7 68

Dr Stephane Nwolley wants to identify the students with a score greater than the average. Write a MySQL statement to identify these students. Display the student names (Join first name and last name and call it full_name), the score of the student, and their major.

You are the database administrator for a school. Student information is kept in a students table where students are tracked by student_id. Students have a grade point average listed for each semester in a table named grades where each student is referenced by student_id.The school is giving an award to all students who achieved a 4.0 grade point average during any semester. You need to generate a list of all the students who should get the award. You begin typing your query:What should you type in the blank space? (Please type your answer all in lower case. Example: select)

1/3

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.