9 Just Eat Takeaway SQL Interview Questions (Updated 2024)

Updated on

March 3, 2024

At Just Eat Takeaway, SQL is crucial for analyzing customer ordering patterns for targeted marketing, and managing restaurant information for optimized delivery. That's why Just Eat Takeaway often tests SQL coding questions in interviews for Data Science, Analytics, and & Data Engineering jobs.

So, to help you practice for the Just Eat Takeaway SQL interview, we'll cover 9 Just Eat Takeaway SQL interview questions – able to solve them?

9 Just Eat Takeaway SQL Interview Questions

SQL Question 1: Calculate Monthly Average Order Value for Each Restaurant

Just Eat Takeaway would like to determine the monthly average order value of each restaurant listed in their platform. You are provided with two datasets - 'orders' and 'restaurants'. The 'orders' table contains information about each order including the order_id, restaurant_id, order_date, and total_order_value. The 'restaurants' table contains information about each restaurant including the restaurant_id and its name.

Write a SQL query using window function to calculate the average order value for each restaurant, month by month.

Example Input:


Example Input:

6000Burger King


The query first calculates the monthly averages using a window function in the CTE. This CTE is then joined with the table in the main query to get the names of the restaurants. The results are sorted by month and then by restaurant name.

p.s. Window functions show up super frequently during SQL interviews, so practice the 27+ window function questions on DataLemur

SQL Interview Questions on DataLemur

SQL Question 2: Filter Customers With Specific Order Attributes

In Just Eat Takeaway, you have the responsibility to help business partners enhance their operations. To this end, you want to find all customers who placed an order with the following attributes from the and tables:

  1. The order is placed after May 1, 2022.
  2. They ordered from “Pizza Heaven”.
  3. The total amount of the order exceeds £30.

For each qualifying customer, return their full name, email, and total amount spent on orders after the given date.

Example Input:
00011111Pizza Heaven05/02/2022£35
00021112Burger King05/01/2022£20
00031112Pizza Heaven05/02/2022£40
00041113Pizza Hut05/03/2022£25
00051111Pizza Heaven05/02/2022£45
Example Input:
1111John Doejohn.doe@example.com
1112Jane Smithjane.smith@example.com
1113Tom Leetom.lee@example.com


This SQL query filters out customers from the and tables based on the desired conditions, then sums up the total amount that each customer has spent on their orders. It uses the clause to combine and tables, and the clause to filter the records. Finally, is used to group the results by customer id.

SQL Question 3: When doing database schema design, what's an example of two entities that have a one-to-one relationship? What about one-to-many relationship?

In database schema design, a one-to-one relationship between two entities is characterized by each entity being related to a single instance of the other. An example of this is the relationship between a US citizen and their social-security number (SSN) - each citizen has one SSN, and each SSN belongs to one person.

On the other hand, a one-to-many relationship is when one entity can be associated with multiple instances of the other entity. A teacher's relationship with their classes is an example of this - a teacher can teach many classes, but each class is only associated with one teacher.

Just Eat Takeaway SQL Interview Questions

SQL Question 4: Calculate Click-Through-Rate for Just Eat Takeaway

Just Eat Takeaway, an online food delivery marketplace, is interested in understanding its click-through rates. They are specifically interested in seeing how often users who visit their website actually click on the food items (representing a digital ad) to get more details and then finally place an order (conversion).

For this analysis, we will need two tables. The table keeps a record of each user's visit to the website, and the table keeps a record of each food order placed. We assume that a user has clicked through if they have visited and placed an order.

example input:
890156707/21/2022 00:00:0030001
903280307/22/2022 00:00:0020001
755023407/24/2022 00:00:0010001
893056707/26/2022 00:00:0020001
935267807/29/2022 00:00:0030001
example input:
450156707/21/2022 00:00:0030001
480223407/24/2022 00:00:0010001
529067807/29/2022 00:00:0030001
600256707/26/2022 00:00:0020001
601780307/22/2022 00:00:0020001


This query first calculates the total number of visits and the number of times a user clicked on a food item and made an order on the same day. Then it calculates the click-through rate by dividing the count of click and orders by the total visits. These are joined in the FROM clause without a join condition, creating a Cartesian product (cross join), since there is only one row in each subquery, it leads to their combination into one row.

To solve a similar problem about calculating rates, try this TikTok SQL question on DataLemur's interactive coding environment: TikTok SQL Interview Question

SQL Question 5: Do NULLs in SQL mean the same thing as a zero?

A NULL value represents a missing or unknown value. It is different from a zero or a blank space, which are actual values. It is important to handle NULL values properly in SQL because they can cause unexpected results if not treated correctly.

SQL Question 6: Average Order Price per City

Given the following tables for Just Eat Takeaway's customers and orders, generate a report calculating the average order price in each city.

The table contains details about each customer including their delivery address, and the table contains details about each order including the total price. Use the field from the table, and the field from the table.

Example Input:
001JohnDoeNew York10001
002JaneSmithLos Angeles90001
004JamesBrownSan Francisco94101
005RobertDavisNew York10001
Example Input:


This query joins the and tables based on the field, which is common in both tables. It then groups the results by , and for each city it calculates the average of the field from the table. The function is used to calculate the average order price.

Example Output:
New York23.50
Los Angeles25.75
San Francisco19.00

The result of the query is a list of cities along with the corresponding average order price.

SQL Question 7: Could you describe the function of UNION in SQL?


The operator merges the output of two or more statements into a single result set. The two SELECT statements within the UNION must have the same number of columns and the data types of the columns are all compatible.

For example, if you were a Data Analyst on the marketing analytics team at Just Eat Takeaway, this statement would return a combined result set of both Just Eat Takeaway's Google and Facebook ads that have more than 300 impressions:

SQL Question 8: Find Customers Ordering Specific Cuisine

Just Eat Takeaway has a variety of dishes from different cuisines. For a marketing exercise, they want to target customers who have ordered Italian food in the past. The task is to identify customers whose orders contain the word ‘Italian’ from the table.

Example Input:
213John Doejohndoe@example.com01/12/2020
127Jane Doejanedoe@example.com20/10/2021
176Mary Janemary@doe.com15/03/2020
109Peter Parkerpeter@parker.com27/05/2022
Example Input:
50121316/09/2022Pizza Margherita, Gelato30.5
50212706/10/2022Butter Chicken, Rice25
50317612/09/2022Spaghetti Bolognese, Tiramisu28
50410920/10/2022Sushi, Miso Soup36


This query joins and tables on . The WHERE clause filters out the rows from the joined table where contains the word 'Italian'. We use the LIKE keyword and the '%' wildcard to match any sequence of characters before and after 'Italian'. This will return the list of customers who have ordered Italian food at least once.

SQL Question 9: Analyzing Order and Customer Data

Write a SQL query to analyze the table and join it with the table. From the end result, it should be possible to determine the total amount spent by each customer based on their location.

The table has the following fields:

  • (INT)
  • (INT)
  • (DATE)
  • (FLOAT)
  • (INT)

The table has the following fields:

  • (INT)
  • (STRING)
  • (STRING)
Example Input:
Example Input:
101John DoeLondon
102Jane DoeBerlin
103Bob SmithAmsterdam


You can answer this question by writing a SQL select query that groups the combined orders and customers data by .

This SQL query joins the and tables based on matching . The orders are then grouped by customer location, and the total order amount is summed for each group (location). The result set will give the total amount spent by customers in each location.

Because join questions come up so often during SQL interviews, practice this interactive Snapchat Join SQL question: Snapchat JOIN SQL interview question

Just Eat Takeaway SQL Interview Tips

Assuming that you've already got basic SQL skills, the next best tip we have to prepare for the Just Eat Takeaway SQL interview is to solve as many practice SQL interview questions as you can! In addition to solving the earlier Just Eat Takeaway SQL interview questions, you should also solve the 200+ SQL exercises on DataLemur which come from companies like Amazon, Microsoft, Meta, and smaller tech companies. DataLemur SQL and Data Science Interview Questions

Each interview question has multiple hints, step-by-step solutions and best of all, there's an interactive SQL code editor so you can right in the browser run your query and have it executed.

To prep for the Just Eat Takeaway SQL interview you can also be a great idea to solve SQL problems from other tech companies like:

But if your SQL foundations are weak, don't worry about diving straight into solving questions – go learn SQL with this interactive SQL tutorial.

DataLemur SQL Course

This tutorial covers SQL topics like CASE/WHEN/ELSE statements and removing NULLs – both of which pop up often during Just Eat Takeaway SQL assessments.

Just Eat Takeaway Data Science Interview Tips

What Do Just Eat Takeaway Data Science Interviews Cover?

In addition to SQL query questions, the other types of questions to practice for the Just Eat Takeaway Data Science Interview are:

  • Statistics and Probability Questions
  • Python or R Coding Questions
  • Product Analytics Questions
  • Machine Learning and Predictive Modeling Questions
  • Resume-Based Behavioral Questions

Just Eat Takeaway Data Scientist

How To Prepare for Just Eat Takeaway Data Science Interviews?

To prepare for Just Eat Takeaway Data Science interviews read the book Ace the Data Science Interview because it's got:

  • 201 interview questions sourced from FAANG (FB, Apple, Amazon, Netflix, Google)
  • a crash course on Python, SQL & ML
  • over 900+ reviews on Amazon & 4.5-star rating

Ace the Data Science Interview by Nick Singh Kevin Huo