0% found this document useful (0 votes)
3 views2 pages

SQL Sample Real Questions

The document contains a series of SQL practice questions focused on beginner topics, including SELECT statements, LIMIT clauses, and WHERE conditions. Each section provides specific tasks such as retrieving data from various tables, filtering results based on criteria, and limiting the number of records returned. The questions are designed to help beginners practice and understand fundamental SQL concepts and operations.

Uploaded by

mohammedtariq226
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

SQL Sample Real Questions

The document contains a series of SQL practice questions focused on beginner topics, including SELECT statements, LIMIT clauses, and WHERE conditions. Each section provides specific tasks such as retrieving data from various tables, filtering results based on criteria, and limiting the number of records returned. The questions are designed to help beginners practice and understand fundamental SQL concepts and operations.

Uploaded by

mohammedtariq226
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL Practice Questions - Beginner Topics

SQL SELECT

1. Retrieve all columns from the 'customers' table.

2. Select only the 'name' and 'email' columns from the 'customers' table.

3. Fetch all records from the 'products' table where the category is 'Electronics'.

4. List the names of all products along with their prices.

5. Show the names and total order amounts of all customers from the 'orders' table.

6. Get all fields from 'orders' where the order status is 'Shipped'.

7. Display the product_id and product_name from 'products'.

8. Select all columns for customers who signed up after '2024-01-01'.

9. Get the review text and rating from 'product_reviews' where rating = 5.

10. Fetch all rows from the 'payments' table.

SQL LIMIT

1. Retrieve the first 10 rows from the 'customers' table.

2. Get the 5 most expensive products from the 'products' table.

3. List the 3 latest orders by order_date.

4. Show the first 10 customers ordered by signup_date.

5. Get the top 5 rated reviews from 'product_reviews'.

6. List 5 cheapest items from 'products' with price > 0.

7. Retrieve 7 most recent payment entries from 'payments'.

8. Select the first 15 orders from 'orders' table.

9. Show 10 newest customers from 'customers' table.

10. List 3 most recent 'Completed' payments from 'payments'.

SQL WHERE

1. Find all products priced above $100.

2. Get all orders where the status is 'Cancelled'.

3. Fetch all customers from the country 'India'.


SQL Practice Questions - Beginner Topics

4. List all reviews where the rating is equal to 1.

5. Show all payments greater than $1000.

6. Find all products that belong to the 'Books' category.

7. Retrieve all customers who signed up in 2023.

8. List all order_items with quantity = 2.

9. Show products where price is not equal to 0.

10. Fetch all reviews with empty or NULL text.

You might also like