RienSQL
SQL TRAINER

192 tasks, one editor

Every task runs on a real schema in your browser. Filter by difficulty, topic or company, then submit your query.

Your progress 0/192
Saved in this browser

192 tasks

#1Names of all peopleAir travels#2Names of all airlinesAir travels#3Trips from MoscowAir travels#4Names ending in "man"Air travelsstring functionspattern matching#5Number of trips on TU-134Air travelsaggregate functions#6Companies that flew on BoeingAir travelsjoins#7Planes to MoscowAir travels#8Flights from ParisAir travelsdate functions#9Companies with flights from VladivostokAir travelsjoins#10Departures at a specific timeAir travelsdate functions#11Passengers with the longest nameAir travelsstring functionssubquery#12Number of passengers on flightsAir travelsjoinsgroup by#13Full namesakesAir travelsgroup byhaving#14Cities Bruce Willis visitedAir travelsjoins#15Steve Martin's arrival in LondonAir travelsjoinsdate functions#16Passengers by number of flightsAir travelsaggregate functionssorting#17Family expenses in 2005Familyaggregate functionsgroup by#18The oldest personFamilysubqueryaggregate functions#19Who bought potatoesFamilygroup byjoins#20Spending on entertainmentFamilygroup byaggregate functions#21Products bought more than onceFamilyaggregate functionsgroup by#22Names of all mothersFamily#23Most expensive delicacyFamilysubqueryaggregate functions#24Who spent how much in June 2005Familyaggregate functionsgroup by#25Goods not purchased in 2005Familydate functionssubquery#26Groups of goods not purchased in 2005Familydate functionssubquery#27Spending by product group in 2005Familyaggregate functionsgroup by#28Flights from Rostov to MoscowAir travelsaggregate functionsjoins#29Names of passengers flying to MoscowAir travelsjoins#30Flight loadAir travelsgroup bysorting#31Quincey family membersFamilystring functionspattern matching#32Average age of peopleFamilymath functionsaggregate functions#33Average price of caviarFamilyjoinsaggregate functions#34Number of 10th gradesSchedulestring functionspattern matching#35Classrooms used on September 2, 2019Schedulepattern matchingaggregate functions#36Students living on Pushkin streetSchedulestring functionspattern matching#37Age of the youngest studentScheduledate functionssorting#38Number of students named AnnaScheduleaggregate functions#39Number of students in 10 B gradeSchedulejoinsaggregate functions#40Subjects of Romashkin P.P.Schedulejoinsstring functions#41Start of the fourth lessonSchedule#42Time at school from 2nd to 4th subjectSchedulesubquery#43Physical Culture teachersSchedulejoinssorting#44Maximum age in 10th gradesScheduleaggregate functionsjoins#45Most used classroomsSchedulegroup byhaving#46Classes of teacher KrauzeSchedulejoins#47Krauze's classes on August 30, 2019Schedulejoinsaggregate functions#48Class occupancyScheduleaggregate functionssorting#49Percentage of students in 10 ASchedulemath functionsaggregate functions#50Percentage of students born in 2000Schedulemath functionsaggregate functions#51Add product "Cheese"Familyinsertsubquery#52Add product type "auto"Familyinsertaggregate functions#53Change name to "Andie Anthony"Familyupdate#54Delete Quincey family membersFamilystring functionspattern matching#55Delete companies with the fewest flightsAir travelsaggregate functionsdelete#56Delete flights from MoscowAir travelsdelete#57Reschedule for 30 minutesScheduleupdatedate functions#58Add a review from George ClooneyAirbnbinsertaggregate functions#59Users with a Belarusian numberAirbnbstring functionspattern matching#60Teachers of 11th gradesSchedulegroup byaggregate functions#61Rooms reserved on the 12th week of 2020Airbnbjoinsdate functions#62Popularity of 2nd level domainsAirbnbgroup byaggregate functions#63Sorting by student namesSchedulestring functionssorting#64Number of bookings by monthAirbnbaggregate functionssorting#65Rating of rented roomsAirbnbmath functionsaggregate functions#66Rooms with all amenitiesAirbnbaggregate functionsjoins#67Departure and arrival timeAir travelsstring functions#68Last room tenantAirbnbaggregate functionsjoins#69Earnings of room ownersAirbnbaggregate functionssorting#70Categorization of housing by priceAirbnbaggregate functionssubquery#71Percentage of active usersAirbnbmath functionsaggregate functions#72Average booking priceAirbnbgroup byaggregate functions#73Rooms rented an odd number of timesAirbnbmath functionsaggregate functions#74Internet availability in the roomAirbnb#75Students born in MayScheduledate functions#76User status: owner/tenantAirbnbsubquery#77Create "People" viewScheduleview#78Users with hotmail.com emailAirbnbstring functionspattern matching#79Price with 10% discountAirbnb#80Create "Verified_Users" viewAirbnbview#93Average age of Smartwatch buyersAlfa-Bankaggregate functionsjoins#94Buyers of Laptop and Monitor in MarchAlfa-Bankaggregate functionsjoins#95Clients with a purchase amount greater than 9200Alfa-Bankaggregate functionsjoins#97Operating warehouses by citySamokataggregate functionsgroup by#99Income from female audienceVKaggregate functions#100Number of male usersVKaggregate functionsgroup by#101User's first orderVKtime serieswindow functions#102Average number of transactions in 72 hoursVKaggregate functionsdata analysis#103Salary higher than the manager'sSberbank#104Maximum salary in the departmentSberbanksubqueryaggregate functions#105Employees without a manager in the departmentSberbankjoins#109Country of the city of SalzburgDomClickjoins#110Cities in the Bavaria regionDomClickjoins#111Population of each regionDomClickjoinsgroup by#112Average spending in HamburgDomClickaggregate functionsjoins#114Second pilots to New YorkT-Bankjoins#115Pilots over 45 on cargo planesT-Bankaggregate functionsjoins#116Top 3 pilots by number of passengersT-Bankaggregate functionsdata analysis#123Number of tasks for an employeeFinstar Financial Groupaggregate functionsjoins#125Works published more than 5 timesCianhavinggroup by#126Copies not linked to any editionCianjoins#127User last 3 borrowed works and total times takenCianaggregate functionsjoins#128Create index on priceAirbnbindexes#129Contract numbers for companies with SBER in nameGlowBytejoinspattern matching#130Number of contracts per companyGlowByteaggregate functionsjoins#131Number of orders by each registered customerFacebookjoinsgroup by#139Big CountriesAmazon#144Composite index on home_type and priceAirbnbindexes#145Composite index with sortingScheduleindexes#146Functional index on subjectScheduleindexes#147Expand reservation date rangesAirbnbrecursivetime series#153Most Active ReviewerSAPaggregate functionsjoins#154Top Consultant by Average Rating in FebruarySAPaggregate functionsjoins#155License Utilization OverflowSAPjoinssorting#156Monthly Average Product RatingZalandoaggregate functionsgroup by#157Average Items Per OrderZalandoaggregate functionsgroup by#158Inventory State BreakdownZalandoaggregate functionsjoins#159Top Category by Monthly RevenueZalandotime seriesaggregate functions#160Top-5 Customers in Last 30 DaysDelivery Heroaggregate functionsjoins#161Average Delivery Time per CityDelivery Heromath functionsaggregate functions#162Monthly Avg Delivery Time (window functions)Delivery Herotime seriesaggregate functions#163Loyal Berlin Pizza CustomersDelivery Heroaggregate functionsjoins#164Average Response Time per ApplicationDynatrace APMaggregate functionsjoins#165CPU Sample with Daily Server BaselinesDynatrace APMtime seriesaggregate functions#166Server Risk Score Under Peak LoadDynatrace APMaggregate functionsgroup by#167Active Annual SubscriptionsDynatrace Subscriptionsjoinsdate functions#168Average Bet per Betting TypeEntain / Bwinaggregate functionsgroup by#169Top-10 PC Gamers by Total Bet SpendEntain / Bwinaggregate functionsjoins#170Average Bet and Total Wins per Active PlayerEntain / Bwinaggregate functionsjoins#171Weekly Bet Dynamics (LAG)Entain / Bwintime seriesaggregate functions#172Spending by Merchant CategoryN26aggregate functionsgroup by#173Monthly Active Users (MAU)N26time seriesaggregate functions#174Churn-Risk CustomersN26aggregate functionsjoins#175Running Balance over TransactionsN26time seriesaggregate functions#176Top-10 Spenders by Total Purchase AmountKlarnaaggregate functionsjoins#177Top-3 Spenders per RegionKlarnaaggregate functionswindow functions#179Revenue per CityBooking.comaggregate functionsjoins#180Average Length of Stay per Property TypeBooking.comaggregate functionsjoins#181Cancellation Rate per CityBooking.commath functionsaggregate functions#184VIP Users by Transaction CountKaspi — transactionsaggregate functionsgroup by#189Nations with the Most BattlesWargaming — player battlesaggregate functionsgroup by#190Player Cohorts by Battle CountWargaming — player battlesaggregate functionsgroup by#191Players Active on Two Consecutive DaysWargaming — player battlesaggregate functionsgroup by#192Search-to-View Conversion: Filtered vs NotKolesa — listings funnelmath functionsaggregate functions#193View-to-Contact Conversion by CategoryKolesa — listings funnelmath functionsaggregate functions#194The report lost employees without ordersCompanyfix queryjoins#195The dashboard overstates department headcountCompanyfix queryjoins#196The list of employees without subordinates came out emptyCompanyfix querysubquery#197The salary review list picked up extra peopleCompanyfix query#198The whole department headcount is counted instead of the needed partCompanyfix querygroup by#199Two people on the boundary dropped out of the bonus listCompanyfix query#200Customers with no purchases disappeared from the reportCompanyfix queryjoins#201The wrong employees ended up among department leadersCompanyfix querysubquery#202Departments repeat in the listCompanyfix queryjoins#203A user was credited with someone else's bookingsAirbnbfix queryjoins#204The February report lost a bookingAirbnbfix querydate functions#205Department shares add up to 94%Companyfix querygroup by#206The raise list is missing peopleCompanyfix querywindow functions#207Two departments split the whole company revenueCompanyfix querywindow functions#208The falling sales report picked up extra rowsCompanyfix querywindow functions#209Delivery Peak HoursGlovoaggregate functionsgroup by#210Late Delivery Rate by CityGlovoaggregate functionsjoins#211Courier Distance in MarchGlovoaggregate functionsjoins#212Peak Hour in Each CityGlovoaggregate functionsjoins#213Surge-Priced RidesCabifyaggregate functionsgroup by#214Cancellation Rate by CityCabifyaggregate functionsgroup by#215Driver UtilizationCabifyaggregate functionsjoins#216Rides Without a Matching DriverCabifyjoinssorting#217Card Spending by Category in MarchBBVAaggregate functionsgroup by#218Customers With No Activity in JuneBBVAjoinssubquery#219Account Statement: Cards and TransfersBBVAdate functionssorting#220Balance by Product TypeBBVAaggregate functionsjoins#221Accounts Over Their Overdraft LimitSantanderjoinssorting#222Second-Largest Charge per CustomerSantanderjoinssubquery#223Rolling 7-Day ChargesSantanderaggregate functionsgroup by#224Month-over-Month Change in ChargesSantanderaggregate functionsgroup by#225Q1 Sales by CategoryInditexaggregate functionsjoins#226Stores Below TargetInditexaggregate functionsjoins#227Sell-Through by CategoryInditexaggregate functionsjoins#228Products Not Sold in a RegionInditexjoinssubquery#229Busiest RoutesAmadeusaggregate functionsgroup by#230Average Departure Delay per AirlineAmadeusaggregate functionsjoins#231Daily Cancellation Rate per AirlineAmadeusaggregate functionsgroup by#232Highest Average Booking Price per MonthAmadeusaggregate functionsjoins#233Revenue by MarketeDreams ODIGEOaggregate functionsgroup by#234A/B Test ConversioneDreams ODIGEOaggregate functionsjoins#235Booking Funnel by MarketeDreams ODIGEOaggregate functionsjoins#236Repeat CustomerseDreams ODIGEOjoinssubquery#237Sold Within a WeekWallapopdate functionssorting#238Repeat Sellers by CityWallapopaggregate functionsjoins#239Median Time to Sell by CategoryWallapopaggregate functionsgroup by#240Chat-to-Sale ConversionWallapopaggregate functionsjoins