These are SQL questions of the kind Myntra actually asks — the patterns reported from Myntra's SQL screens and data/SDE interview rounds. My advice: treat this page as a mock test. Attempt every question on paper first, then reveal. If any answer surprises you, the lesson it comes from is linked right below — go read it, then come back.
Myntra SQL query questions
Given the e-commerce schema below (customers, orders, order_items, products), write a query using an INNER JOIN to list the customer name, order id, and order date for every order, ordered by order id.
Asked in


customers4 rows
| customer_id | customer_name | city |
|---|---|---|
| 1 | Aditi Verma | Mumbai |
| 2 | Rohan Gupta | Delhi |
| 3 | Sneha Iyer | Bangalore |
| 4 | Karan Mehta | Mumbai |
orders4 rows
| order_id | customer_id | order_date | total_amount |
|---|---|---|---|
| 101 | 1 | 2023-01-05 | 1200.00 |
| 102 | 1 | 2023-02-10 | 800.00 |
| 103 | 2 | 2023-01-20 | 500.00 |
| 104 | 3 | 2023-03-01 | 1200.00 |
order_items6 rows
| item_id | order_id | product_id | quantity | unit_price |
|---|---|---|---|---|
| 1 | 101 | 501 | 2 | 300.00 |
| 2 | 101 | 502 | 1 | 600.00 |
| 3 | 102 | 501 | 1 | 300.00 |
| 4 | 102 | 503 | 1 | 500.00 |
| 5 | 103 | 503 | 1 | 500.00 |
| 6 | 104 | 502 | 2 | 600.00 |
products4 rows
| product_id | product_name | category | price |
|---|---|---|---|
| 501 | Wireless Mouse | Electronics | 300.00 |
| 502 | Mechanical Keyboard | Electronics | 600.00 |
| 503 | Desk Lamp | Home | 500.00 |
| 504 | Notebook Set | Stationery | 150.00 |
Given departments(dept_id, dept_name, location) and employees(emp_id, name, dept_id, salary), write a query using IN with a subquery to list the names of employees who work in departments located in 'Bangalore'.
Asked in


departments3 rows
| dept_id | dept_name | location |
|---|---|---|
| 10 | Engineering | Bangalore |
| 20 | Sales | Mumbai |
| 30 | Support | Bangalore |
employees4 rows
| emp_id | name | dept_id | salary |
|---|---|---|---|
| 1 | Alice | 10 | 55000 |
| 2 | Bob | 20 | 48000 |
| 3 | Carol | 30 | 62000 |
| 4 | David | 20 | 45000 |
Given departments(dept_id, dept_name) and employees(emp_id, name, dept_id, salary), write a query using NOT EXISTS to find departments where every employee earns more than 50000 (i.e., no employee in that department earns 50000 or less).
Asked in


departments3 rows
| dept_id | dept_name |
|---|---|
| 10 | Engineering |
| 20 | Sales |
| 30 | HR |
employees5 rows
| emp_id | name | dept_id | salary |
|---|---|---|---|
| 1 | Alice | 10 | 60000 |
| 2 | Bob | 10 | 55000 |
| 3 | Carol | 20 | 62000 |
| 4 | David | 20 | 40000 |
| 5 | Eve | 30 | 90000 |
How to use this page: Myntra rarely asks a question you've never seen — they ask standard patterns with a twist. Master the pattern in the SQL course lessons, and the twist stops mattering.
Keep practising: SQL Basics, Joins, GROUP BY & HAVING and Subqueries cover what most Myntra SQL rounds test.

