Skip to content

noor8791/Mysql-basic-50-Question-solution-with-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

के 50 Basic Problems/Questions देता हूँ जो शुरुआत से लेकर अच्छे level तक cover करेंगे। ये practice questions आपके लिए बहुत helpful होंगे।


📌 MySQL Basic 50 Problems 🔹 A. Table Creation & Basic Queries (Q1–Q10)

  1. Create a database named school.
  2. Create a table students with columns: id, name, age, class, marks.
  3. Insert 5 records into students table.
  4. Show all records from students table.
  5. Display only name and marks of students.
  6. Show students whose age is greater than 15.
  7. Show students who have marks more than 80.
  8. Show all students in ascending order of marks.
  9. Show all students in descending order of age.
  10. Count total number of students in the table.

🔹 B. Filtering & Operators (Q11–Q20) 11. Show students with marks between 50 and 80. 12. Show students who are in class 10. 13. Show students whose name starts with "A". 14. Show students whose name ends with "n". 15. Show students whose name contains "oo". 16. Show students who do not belong to class 12. 17. Show students who are either in class 10 or class 12. 18. Find the maximum marks in the table. 19. Find the minimum marks in the table. 20. Find the average marks of all students.


🔹 C. Aggregates & Grouping (Q21–Q30) 21. Find total marks of all students. 22. Count how many students are in each class (use GROUP BY). 23. Find the highest marks student from each class. 24. Find the lowest marks student from each class. 25. Find the average marks of each class. 26. Count number of students in each age group. 27. Show class where average marks is more than 70. 28. Find students who scored above class average. 29. Find the second highest marks in the table. 30. Find the top 3 students with highest marks.


🔹 D. Joins (Q31–Q40) 👉 Assume another table teachers(id, name, subject, class) exists. 31. Show all teachers with their respective classes. 32. Show teacher names along with student names of their class. 33. Find all students with their class teacher’s name. 34. Show all classes and number of students in each class. 35. Show teachers who teach more than 1 class. 36. Find classes where no teacher is assigned. 37. Find teachers who have students with marks > 90. 38. Show student details along with subject taught by their class teacher. 39. Find the class with maximum students. 40. Find the class with minimum average marks.


🔹 E. Subqueries & Advanced (Q41–Q50) 41. Show students who scored more than the average marks. 42. Show students who scored equal to the maximum marks. 43. Show students whose marks are greater than all students of class 10. 44. Find students whose age is above average age. 45. Show students who are among the top 5 in marks. 46. Find duplicate names in students table. 47. Delete duplicate rows (keeping only one). 48. Update marks of student id=3 to 95. 49. Delete student whose marks are less than 35. 50. Drop the table students.


👉 ये 50 questions आपके MySQL के basic से intermediate concepts को clear करेंगे। अगर आप चाहो तो मैं इनका step-by-step SQL query answer भी दे सकता हूँ। क्या आप चाहते हो कि मैं इन 50 questions के solutions भी लिख दूँ SQL queries के साथ?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published