Database DSA Problems

197 database problems for coding interviews and campus placements, with hints and company tags. Below are the first 100 of 197: 85 easy, 0 medium and 15 hard. Practise them free on InternHack and track what you have solved.

Database problems, easiest first

  1. Actors and Directors Who Cooperated At Least Three Times (Easy)
  2. Ad-Free Sessions (Easy)
  3. Ads Performance (Easy)
  4. All the Matches of the League (Easy)
  5. All Valid Triplets That Can Represent a Country (Easy)
  6. Article Views I (Easy)
  7. Average Selling Price (Easy)
  8. Average Time of Process per Machine (Easy)
  9. Bank Account Summary II (Easy)
  10. Big Countries (Easy)
  11. Biggest Single Number (Easy)
  12. Calculate Compressed Mean (Easy)
  13. Calculate Special Bonus (Easy)
  14. Classes With at Least 5 Students (Easy)
  15. Classifying Triangles by Lengths (Easy)
  16. Combine Two Tables (Easy)
  17. Create a Session Bar Chart (Easy)
  18. Customer Order Frequency (Easy)
  19. Customer Placing the Largest Number of Orders (Easy)
  20. Customer Who Visited but Did Not Make Any Transactions (Easy)
  21. Customers Who Never Order (Easy)
  22. Delete Duplicate Emails (Easy)
  23. Duplicate Emails (Easy)
  24. Employee Bonus (Easy)
  25. Employees Earning More Than Their Managers (Easy)
  26. Employees Whose Manager Left the Company (Easy)
  27. Find Books with No Available Copies (Easy)
  28. Find Candidates for Data Scientist Position (Easy)
  29. Find Customer Referee (Easy)
  30. Find Customers With Positive Revenue this Year (Easy)
  31. Find Expensive Cities (Easy)
  32. Find Followers Count (Easy)
  33. Find the Team Size (Easy)
  34. Find Total Time Spent by Each Employee (Easy)
  35. Find Users With Valid E-Mails (Easy)
  36. Fix Names in a Table (Easy)
  37. Friend Requests I: Overall Acceptance Rate (Easy)
  38. Friendly Movies Streamed Last Month (Easy)
  39. Game Play Analysis I (Easy)
  40. Game Play Analysis II (Easy)
  41. Group Sold Products By The Date (Easy)
  42. Immediate Food Delivery I (Easy)
  43. Invalid Tweets (Easy)
  44. List the Products Ordered in a Period (Easy)
  45. Loan Types (Easy)
  46. Not Boring Movies (Easy)
  47. NPV Queries (Easy)
  48. Number of Comments per Post (Easy)
  49. Number of Unique Subjects Taught by Each Teacher (Easy)
  50. Patients With a Condition (Easy)
  51. Percentage of Users Attended a Contest (Easy)
  52. Primary Department for Each Employee (Easy)
  53. Product Sales Analysis I (Easy)
  54. Product Sales Analysis II (Easy)
  55. Product Sales Analysis V (Easy)
  56. Product's Price for Each Store (Easy)
  57. Project Employees I (Easy)
  58. Project Employees II (Easy)
  59. Queries Quality and Percentage (Easy)
  60. Rearrange Products Table (Easy)
  61. Recyclable and Low Fat Products (Easy)
  62. Reformat Department Table (Easy)
  63. Replace Employee ID With The Unique Identifier (Easy)
  64. Reported Posts (Easy)
  65. Rising Temperature (Easy)
  66. Sales Analysis I (Easy)
  67. Sales Analysis II (Easy)
  68. Sales Analysis III (Easy)
  69. Sales Person (Easy)
  70. Sellers With No Sales (Easy)
  71. Students and Examinations (Easy)
  72. Students With Invalid Departments (Easy)
  73. Swap Sex of Employees (Easy)
  74. The Latest Login in 2020 (Easy)
  75. The Number of Employees Which Report to Each Employee (Easy)
  76. The Number of Rich Customers (Easy)
  77. The Number of Users That Are Eligible for Discount (Easy)
  78. The Users That Are Eligible for Discount (Easy)
  79. The Winner University (Easy)
  80. Top Travellers (Easy)
  81. Triangle Judgement (Easy)
  82. User Activity for the Past 30 Days I (Easy)
  83. User Activity for the Past 30 Days II (Easy)
  84. Warehouse Manager (Easy)
  85. Weather Type in Each Country (Easy)
  86. Analyze Organization Hierarchy (Hard)
  87. Consecutive Transactions with Increasing Amounts (Hard)
  88. Customers With Strictly Increasing Purchases (Hard)
  89. Department Top Three Salaries (Hard)
  90. Find Cumulative Salary of an Employee (Hard)
  91. Find Median Given Frequency of Numbers (Hard)
  92. Find the Subtasks That Did Not Execute (Hard)
  93. Finding the Topic of Each Post (Hard)
  94. First and Last Call On the Same Day (Hard)
  95. Game Play Analysis V (Hard)
  96. Get the Second Most Recent Activity (Hard)
  97. Hopper Company Queries I (Hard)
  98. Hopper Company Queries II (Hard)
  99. Hopper Company Queries III (Hard)
  100. Human Traffic of Stadium (Hard)

Companies that ask database problems

Before your interview

Most resumes are filtered by software before a recruiter reads them. Check your resume ATS score free, no signup needed.

Other DSA topics