IshaSQL practice guide
Stay inside one business context for a few reps in a row while still working from the same live bank used across practice, tracks, and reviews.
IshaSQL
Explore 77 IshaSQL-tagged SQL scenarios focused on filtering, aggregation, joins.
Context, not signal
Company labels help frame practice in a familiar business context. They are directional study aids, not official interview guidance from the companies listed.
Sign in to track progress while you browse this guide.
Questions
77
Estimated prep time
1605 min
Progress tracking
Sign in to track progress
Concept focus
The most common patterns in the current IshaSQL-tagged set.
Filtering
53
Aggregation
52
Joins
26
Date functions
5
Mix at a glance
Use the difficulty and path mix to decide whether you want fundamentals, breadth, or stretch reps.
Suggested rhythm
Start with the easiest scenario in the set, then move upward while tracking accuracy and retry speed. This keeps the context stable while the difficulty rises.
Suggested next scenarios
The next best reps from this company-tagged set based on what you have not solved yet.
DNA Pattern Recognition
Practice filtering through a IshaSQL-tagged business scenario.
Odd and Even Transactions
Practice aggregation through a IshaSQL-tagged business scenario.
Employees Whose Manager Left the Company
Practice filtering through a IshaSQL-tagged business scenario.
Question list
The current IshaSQL-tagged list with learning objectives and your latest status.
DNA Pattern Recognition
Table: Samples +----------------+---------+ | Column Name | Type | +----------------+---------+ | sample_id | int | | dna_sequence | varchar | | species | va...
Practice filtering through a IshaSQL-tagged business scenario.
Odd and Even Transactions
Table: transactions +------------------+------+ | Column Name | Type | +------------------+------+ | transaction_id | int | | amount | int | | transaction_da...
Practice aggregation through a IshaSQL-tagged business scenario.
Employees Whose Manager Left the Company
Table: Employees +-------------+----------+ | Column Name | Type | +-------------+----------+ | employee_id | int | | name | varchar | | manager_id | int | |...
Practice filtering through a IshaSQL-tagged business scenario.
Employees With Missing Information
Table: Employees +-------------+---------+ | Column Name | Type | +-------------+---------+ | employee_id | int | | name | varchar | +-------------+---------...
Practice filtering through a IshaSQL-tagged business scenario.
Count Salary Categories
Table: Accounts +-------------+------+ | Column Name | Type | +-------------+------+ | account_id | int | | income | int | +-------------+------+ account_id ...
Practice aggregation through a IshaSQL-tagged business scenario.
The Latest Login in 2020
Table: Logins +----------------+----------+ | Column Name | Type | +----------------+----------+ | user_id | int | | time_stamp | datetime | +---------------...
Practice aggregation through a IshaSQL-tagged business scenario.
Rearrange Products Table
Table: Products +-------------+---------+ | Column Name | Type | +-------------+---------+ | product_id | int | | store1 | int | | store2 | int | | store3 | ...
Practice filtering through a IshaSQL-tagged business scenario.
Primary Department for Each Employee
Table: Employee +---------------+---------+ | Column Name | Type | +---------------+---------+ | employee_id | int | | department_id | int | | primary_flag |...
Practice filtering through a IshaSQL-tagged business scenario.
Recyclable and Low Fat Products
Table: Products +-------------+---------+ | Column Name | Type | +-------------+---------+ | product_id | int | | low_fats | enum | | recyclable | enum | +--...
Practice filtering through a IshaSQL-tagged business scenario.
Find Total Time Spent by Each Employee
Table: Employees +-------------+------+ | Column Name | Type | +-------------+------+ | emp_id | int | | event_day | date | | in_time | int | | out_time | in...
Practice aggregation through a IshaSQL-tagged business scenario.
The Number of Employees Which Report to Each Employee
Table: Employees +-------------+----------+ | Column Name | Type | +-------------+----------+ | employee_id | int | | name | varchar | | reports_to | int | |...
Practice aggregation through a IshaSQL-tagged business scenario.
Find Followers Count
Table: Followers +-------------+------+ | Column Name | Type | +-------------+------+ | user_id | int | | follower_id | int | +-------------+------+ (user_id...
Practice aggregation through a IshaSQL-tagged business scenario.
Daily Leads and Partners
Table: DailySales +-------------+---------+ | Column Name | Type | +-------------+---------+ | date_id | date | | make_name | varchar | | lead_id | int | | p...
Practice aggregation through a IshaSQL-tagged business scenario.
Invalid Tweets
Table: Tweets +----------------+---------+ | Column Name | Type | +----------------+---------+ | tweet_id | int | | content | varchar | +----------------+---...
Practice filtering through a IshaSQL-tagged business scenario.
Fix Names in a Table
Table: Users +----------------+---------+ | Column Name | Type | +----------------+---------+ | user_id | int | | name | varchar | +----------------+--------...
Practice filtering through a IshaSQL-tagged business scenario.
Average Time of Process per Machine
Table: Activity +----------------+---------+ | Column Name | Type | +----------------+---------+ | machine_id | int | | process_id | int | | activity_type | ...
Practice aggregation through a IshaSQL-tagged business scenario.
Bank Account Summary II
Table: Users +--------------+---------+ | Column Name | Type | +--------------+---------+ | account | int | | name | varchar | +--------------+---------+ acc...
Practice joins through a IshaSQL-tagged business scenario.
Customer Who Visited but Did Not Make Any Transactions
Table: Visits +-------------+---------+ | Column Name | Type | +-------------+---------+ | visit_id | int | | customer_id | int | +-------------+---------+ v...
Practice joins through a IshaSQL-tagged business scenario.
Patients With a Condition
Table: Patients +--------------+---------+ | Column Name | Type | +--------------+---------+ | patient_id | int | | patient_name | varchar | | conditions | v...
Practice filtering through a IshaSQL-tagged business scenario.
Top Travellers
Table: Users +---------------+---------+ | Column Name | Type | +---------------+---------+ | id | int | | name | varchar | +---------------+---------+ id is...
Practice joins through a IshaSQL-tagged business scenario.
Capital Gain/Loss
Table: Stocks +---------------+---------+ | Column Name | Type | +---------------+---------+ | stock_name | varchar | | operation | enum | | operation_day | ...
Practice aggregation through a IshaSQL-tagged business scenario.
Replace Employee ID With The Unique Identifier
Table: Employees +---------------+---------+ | Column Name | Type | +---------------+---------+ | id | int | | name | varchar | +---------------+---------+ i...
Practice joins through a IshaSQL-tagged business scenario.
List the Products Ordered in a Period
Table: Products +------------------+---------+ | Column Name | Type | +------------------+---------+ | product_id | int | | product_name | varchar | | produc...
Practice joins through a IshaSQL-tagged business scenario.
Queries Quality and Percentage
Table: Queries +-------------+---------+ | Column Name | Type | +-------------+---------+ | query_name | varchar | | result | varchar | | position | int | | ...
Practice aggregation through a IshaSQL-tagged business scenario.
Article Views I
Table: Views +---------------+---------+ | Column Name | Type | +---------------+---------+ | article_id | int | | author_id | int | | viewer_id | int | | vi...
Practice filtering through a IshaSQL-tagged business scenario.
First Login Date
Table: Activity +--------------+---------+ | Column Name | Type | +--------------+---------+ | player_id | int | | device_id | int | | event_date | date | | ...
Practice aggregation through a IshaSQL-tagged business scenario.
Project Employees I
Table: Project +-------------+---------+ | Column Name | Type | +-------------+---------+ | project_id | int | | employee_id | int | +-------------+---------...
Practice joins through a IshaSQL-tagged business scenario.
Actors and Directors Who Cooperated At Least Three Times
Table: ActorDirector +-------------+---------+ | Column Name | Type | +-------------+---------+ | actor_id | int | | director_id | int | | timestamp | int | ...
Practice aggregation through a IshaSQL-tagged business scenario.
Not Boring Movies
Table: Cinema +----------------+----------+ | Column Name | Type | +----------------+----------+ | id | int | | movie | varchar | | description | varchar | |...
Practice filtering through a IshaSQL-tagged business scenario.
Sales Person
Table: SalesPerson +-----------------+---------+ | Column Name | Type | +-----------------+---------+ | sales_id | int | | name | varchar | | salary | int | ...
Practice joins through a IshaSQL-tagged business scenario.
Classes With at Least 5 Students
Table: Courses +-------------+---------+ | Column Name | Type | +-------------+---------+ | student | varchar | | class | varchar | +-------------+---------+...
Practice aggregation through a IshaSQL-tagged business scenario.
Big Countries
Table: World +-------------+---------+ | Column Name | Type | +-------------+---------+ | name | varchar | | continent | varchar | | area | int | | populatio...
Practice filtering through a IshaSQL-tagged business scenario.
Customer Placing the Largest Number of Orders
Table: Orders +-----------------+----------+ | Column Name | Type | +-----------------+----------+ | order_number | int | | customer_number | int | +--------...
Practice aggregation through a IshaSQL-tagged business scenario.
Find Customer Referee
Table: Customer +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | name | varchar | | referee_id | int | +------------...
Practice filtering through a IshaSQL-tagged business scenario.
Rising Temperature
Table: Weather +---------------+---------+ | Column Name | Type | +---------------+---------+ | id | int | | recordDate | date | | temperature | int | +-----...
Practice date functions through a IshaSQL-tagged business scenario.
Customers Who Never Order
Table: Customers +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | name | varchar | +-------------+---------+ id is t...
Practice joins through a IshaSQL-tagged business scenario.
Duplicate Emails
Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | email | varchar | +-------------+---------+ id is the...
Practice aggregation through a IshaSQL-tagged business scenario.
Employees Earning More Than Their Managers
Table: Employee +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | name | varchar | | salary | int | | managerId | int...
Practice filtering through a IshaSQL-tagged business scenario.
Calculate Special Bonus
Table: Employees +-------------+---------+ | Column Name | Type | +-------------+---------+ | employee_id | int | | name | varchar | | salary | int | +------...
Practice filtering through a IshaSQL-tagged business scenario.
Percentage of Users Attended a Contest
Table: Users +-------------+---------+ | Column Name | Type | +-------------+---------+ | user_id | int | | user_name | varchar | +-------------+---------+ u...
Practice aggregation through a IshaSQL-tagged business scenario.
Sales Analysis III
Table: Product +--------------+---------+ | Column Name | Type | +--------------+---------+ | product_id | int | | product_name | varchar | | unit_price | in...
Practice joins through a IshaSQL-tagged business scenario.
Game Play Analysis I
IshaSQL is reviewing game play analysis i through a scorecard. Table: Activity +--------------+---------+ | Column Name | Type | +--------------+---------+ |...
Practice aggregation through a IshaSQL-tagged business scenario.
Find Users with High Token Usage
Table: prompts +-------------+---------+ | Column Name | Type | +-------------+---------+ | user_id | int | | prompt | varchar | | tokens | int | +----------...
Practice aggregation through a IshaSQL-tagged business scenario.
Find Loyal Customers
Table: customer_transactions +------------------+---------+ | Column Name | Type | +------------------+---------+ | transaction_id | int | | customer_id | in...
Practice aggregation through a IshaSQL-tagged business scenario.
Find COVID Recovery Patients
Table: patients +-------------+---------+ | Column Name | Type | +-------------+---------+ | patient_id | int | | patient_name| varchar | | age | int | +----...
Practice joins through a IshaSQL-tagged business scenario.
Find Product Recommendation Pairs
Table: ProductPurchases +-------------+------+ | Column Name | Type | +-------------+------+ | user_id | int | | product_id | int | | quantity | int | +-----...
Practice joins through a IshaSQL-tagged business scenario.
Analyze Subscription Conversion
Table: UserActivity +------------------+---------+ | Column Name | Type | +------------------+---------+ | user_id | int | | activity_date | date | | activit...
Practice joins through a IshaSQL-tagged business scenario.
Confirmation Rate
Table: Signups +----------------+----------+ | Column Name | Type | +----------------+----------+ | user_id | int | | time_stamp | datetime | +--------------...
Practice joins through a IshaSQL-tagged business scenario.
Movie Rating
Table: Movies +---------------+---------+ | Column Name | Type | +---------------+---------+ | movie_id | int | | title | varchar | +---------------+--------...
Practice aggregation through a IshaSQL-tagged business scenario.
Students and Examinations
Table: Students +---------------+---------+ | Column Name | Type | +---------------+---------+ | student_id | int | | student_name | varchar | +-------------...
Practice joins through a IshaSQL-tagged business scenario.
Average Selling Price
Table: Prices +---------------+---------+ | Column Name | Type | +---------------+---------+ | product_id | int | | start_date | date | | end_date | date | |...
Practice joins through a IshaSQL-tagged business scenario.
Last Person to Fit in the Bus
Table: Queue +-------------+---------+ | Column Name | Type | +-------------+---------+ | person_id | int | | person_name | varchar | | weight | int | | turn...
Practice filtering through a IshaSQL-tagged business scenario.
Reformat Department Table
Table: Department +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | revenue | int | | month | varchar | +------------...
Practice aggregation through a IshaSQL-tagged business scenario.
Immediate Food Delivery II
Table: Delivery +-----------------------------+---------+ | Column Name | Type | +-----------------------------+---------+ | delivery_id | int | | customer_i...
Practice aggregation through a IshaSQL-tagged business scenario.
2019 Buyer Orders
Table: Users +----------------+---------+ | Column Name | Type | +----------------+---------+ | user_id | int | | join_date | date | | favorite_brand | varch...
Practice joins through a IshaSQL-tagged business scenario.
Next Day Login Fraction
Table: Activity +--------------+---------+ | Column Name | Type | +--------------+---------+ | player_id | int | | device_id | int | | event_date | date | | ...
Practice aggregation through a IshaSQL-tagged business scenario.
Product Sales Analysis III
Table: Sales +-------------+-------+ | Column Name | Type | +-------------+-------+ | sale_id | int | | product_id | int | | year | int | | quantity | int | ...
Practice joins through a IshaSQL-tagged business scenario.
Customers Who Bought All Products
Table: Customer +-------------+---------+ | Column Name | Type | +-------------+---------+ | customer_id | int | | product_key | int | +-------------+-------...
Practice aggregation through a IshaSQL-tagged business scenario.
Swap Consecutive Students
Table: Seat +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | student | varchar | +-------------+---------+ id is the...
Practice filtering through a IshaSQL-tagged business scenario.
Tree Node
Table: Tree +-------------+------+ | Column Name | Type | +-------------+------+ | id | int | | p_id | int | +-------------+------+ id is the column with uni...
Practice aggregation through a IshaSQL-tagged business scenario.
Investments in 2016
Table: Insurance +-------------+-------+ | Column Name | Type | +-------------+-------+ | pid | int | | tiv_2015 | float | | tiv_2016 | float | | lat | float...
Practice filtering through a IshaSQL-tagged business scenario.
Department Highest Salary
Table: Employee +--------------+---------+ | Column Name | Type | +--------------+---------+ | id | int | | name | varchar | | salary | int | | departmentId ...
Practice joins through a IshaSQL-tagged business scenario.
Rank Scores
Table: Scores +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | score | decimal | +-------------+---------+ id is the...
Practice aggregation through a IshaSQL-tagged business scenario.
Market Analysis I
IshaSQL wants a scorecard for market analysis i. Table: Users +----------------+---------+ | Column Name | Type | +----------------+---------+ | user_id | in...
Practice joins through a IshaSQL-tagged business scenario.
Game Play Analysis IV
At IshaSQL, analysts are preparing a scorecard focused on game play analysis iv. Table: Activity +--------------+---------+ | Column Name | Type | +---------...
Practice aggregation through a IshaSQL-tagged business scenario.
Exchange Seats
Use this IshaSQL scorecard to work on exchange seats. Table: Seat +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | s...
Practice filtering through a IshaSQL-tagged business scenario.
Friend Requests II: Who Has The Most Friends
IshaSQL wants a scorecard for friend requests ii: who has the most friends. Table: RequestAccepted +----------------+---------+ | Column Name | Type | +-----...
Practice aggregation through a IshaSQL-tagged business scenario.
Find Emotionally Consistent Users
Table: reactions +--------------+---------+ | Column Name | Type | +--------------+---------+ | user_id | int | | content_id | int | | reaction | varchar | +...
Practice aggregation through a IshaSQL-tagged business scenario.
Most Common Course Pairs
Table: course_completions +-------------------+---------+ | Column Name | Type | +-------------------+---------+ | user_id | int | | course_id | int | | cour...
Practice filtering through a IshaSQL-tagged business scenario.
Find Books with Polarized Opinions
Table: books +-------------+---------+ | Column Name | Type | +-------------+---------+ | book_id | int | | title | varchar | | author | varchar | | genre | ...
Practice joins through a IshaSQL-tagged business scenario.
Find Consistently Improving Employees
Table: employees +-------------+---------+ | Column Name | Type | +-------------+---------+ | employee_id | int | | name | varchar | +-------------+---------...
Practice filtering through a IshaSQL-tagged business scenario.
Seasonal Sales Analysis
Table: sales +---------------+---------+ | Column Name | Type | +---------------+---------+ | sale_id | int | | product_id | int | | sale_date | date | | qua...
Practice joins through a IshaSQL-tagged business scenario.
Restaurant Growth
Table: Customer +---------------+---------+ | Column Name | Type | +---------------+---------+ | customer_id | int | | name | varchar | | visited_on | date |...
Practice aggregation through a IshaSQL-tagged business scenario.
Human Traffic of Stadium
Table: Stadium +---------------+---------+ | Column Name | Type | +---------------+---------+ | id | int | | visit_date | date | | people | int | +----------...
Practice filtering through a IshaSQL-tagged business scenario.
Trips and Users
Table: Trips +-------------+----------+ | Column Name | Type | +-------------+----------+ | id | int | | client_id | int | | driver_id | int | | city_id | in...
Practice joins through a IshaSQL-tagged business scenario.
Department Top Three Salaries
Table: Employee +--------------+---------+ | Column Name | Type | +--------------+---------+ | id | int | | name | varchar | | salary | int | | departmentId ...
Practice joins through a IshaSQL-tagged business scenario.
Find Stores with Inventory Imbalance
Table: stores +-------------+---------+ | Column Name | Type | +-------------+---------+ | store_id | int | | store_name | varchar | | location | varchar | +...
Practice aggregation through a IshaSQL-tagged business scenario.