Saturday Questions | SQL Practice

Saturday Questions: SQL from Zero Level

Today’s Saturday Questions are focused on SQL, the language used to ask clear questions from data stored in tables.

This edition starts from the absolute basics and moves step by step through selecting columns, filtering rows, sorting results, counting records, grouping data, joining tables, and writing a small subquery.

Advertisement

What you will learn

  • SELECT and column selection
  • WHERE filtering
  • ORDER BY sorting
  • COUNT and AVG aggregate functions
  • GROUP BY, HAVING, JOIN, and subquery

Difficulty path

  • Very simple: SELECT rows and columns
  • Simple: WHERE and ORDER BY
  • Medium: COUNT, AVG, GROUP BY, HAVING
  • Hiring level: JOIN, LEFT JOIN, and subquery

Main idea

SQL is not just syntax. It is the skill of asking clear questions from structured data.

The basic SQL pattern

Most beginner SQL queries can be understood through this pattern:

SELECT column1, column2
FROM table_name
WHERE condition
ORDER BY column_name;
The order matters. First understand the table, then choose columns, filter rows, and finally arrange the result.

Questions included in this edition

  1. Show all students
  2. Show only names and cities
  3. Find students from Varanasi
  4. Find students scoring more than 80
  5. Sort students by marks
  6. Count total students
  7. Find average marks
  8. Count students city wise
  9. Find cities with more than one student
  10. Show student names with course names
  11. Show all students and their courses
  12. Find the topper using a subquery

Practice area

Use the embedded practice viewer below. First run the setup SQL inside each question, then write your final query and compare it with the reply.

Saturday Questions Viewer Open full screen

How to attempt the challenge

  • Read the table structure before writing the query.
  • Start with SELECT * FROM table_name; to see the data.
  • Add one clause at a time: WHERE, ORDER BY, GROUP BY, or JOIN.
  • Use clear aliases for calculated columns.
  • Check whether the question asks for rows, groups, or connected tables.

Why SQL matters in hiring

SQL questions are common in hiring tests because almost every business stores data in tables. A candidate who can filter, group, join, and summarize data can solve many real workplace problems.

These questions are designed to build confidence from the first query and slowly move toward practical interview-style SQL.