11 TD Synnex SQL Interview Questions (Updated 2024)

Updated on

October 31, 2024

At TD Synnex, SQL is used for extracting and managing customer data, allowing them to track purchasing patterns and preferences across various product lines. It is also used to analyze IT distribution trends to identify which technologies are in high demand and how they vary by region, which is why TD Synnex often tests SQL problems during interviews for Data Science and Data Engineering positions.

Thus, to help you study, here's 11 TD Synnex SQL interview questions – able to answer them all?

TD Synnex SQL Interview Questions

11 TD Synnex SQL Interview Questions

SQL Question 1: Identify Power Users in TD Synnex

TD Synnex, a leading distributor of IT products and services, wishes to categorize their power users. A power user is defined as a user who has made 20 or more purchases within a single month.

Given a table, the task is to write a SQL query that outputs the user_id and the month of the users who have made more than 20 purchases in that month.

Example Input:

purchase_iduser_idpurchase_dateproduct_id
131006/02/2022501
241206/08/2022502
331006/14/2022501
441206/19/2022501
531006/21/2022503
............
4531006/28/2022506
4641206/29/2022501
4731006/30/2022502

Answer:


This query first groups the data by both the of the purchase date and , and counts the number of rows in each group. The clause then filters out the groups where the count of purchases is less than 20. The result is the list of s who have made more than 20 purchases in a single month.

To practice a super-customer analysis question on DataLemur's free online SQL code editor, try this Microsoft Azure Cloud SQL Interview Question:

Microsoft SQL Interview Question: Super Cloud Customer

Dive into TDSynnex's Destination AI and learn about their cutting-edge solutions that are transforming the data and IoT landscape! Understanding their approach to technology can provide valuable insights into how they are shaping the future of connectivity and data management.

SQL Question 2: Top Three Salaries

Given a table of TD Synnex employee salary information, write a SQL query to find the top 3 highest paid employees within each department.

TD Synnex Example Input:

employee_idnamesalarydepartment_id
1Emma Thompson38001
2Daniel Rodriguez22301
3Olivia Smith20001
4Noah Johnson68002
5Sophia Martinez17501
8William Davis68002
10James Anderson40001

Example Input:

department_iddepartment_name
1Data Analytics
2Data Science

Example Output:

department_namenamesalary
Data AnalyticsJames Anderson4000
Data AnalyticsEmma Thompson3800
Data AnalyticsDaniel Rodriguez2230
Data ScienceNoah Johnson6800
Data ScienceWilliam Davis6800

Try this interview question interactively on DataLemur:

Top 3 Department Salaries

Answer:

We use the DENSE_RANK() window function to generate unique ranks for each employee's salary within their department, with higher salaries receiving lower ranks. Then, we wrap this up in a CTE and filter the employees with a ranking of 3 or lower.


If the code above is confusing, you can find a step-by-step solution here: Top 3 Department Salaries.

SQL Question 3: Can you describe the difference between a unique and a non-unique index?

Some similarities between unique and non-unique indexes include:

  • Both indexes improve the performance of SQL queries by providing a faster way to lookup the desired data.
  • Both indexes use an additional data which requires more storage space which impacts write performance.
  • Both indexes can be created on one or more columns of a table

Some differences between unique and non-unique indexes include:

  • A unique index enforces the uniqueness of the indexed columns, meaning that no duplicate values are allowed in the indexed columns. A non-unique index allows duplicate values in the indexed columns.
  • A unique index can be used to enforce the primary key of a table, but a non-unique index cannot.
  • A unique index can have a maximum of one NULL value in the indexed columns, but a non-unique index can have multiple NULLs

TD Synnex SQL Interview Questions

SQL Question 4: Average Sales per Product by Month

You are given a dataset containing sales data from TD Synnex. Each row in the dataset represents an individual sale, with the following columns:

  • : An ID number uniquely identifying each sale (integer).
  • : An ID number uniquely identifying each product (integer).
  • : The date and time when the sale occurred (timestamp).
  • : The quantity of the product that was sold (integer).
  • : The price per unit of the product at the time of the sale (double).

Write a SQL query that calculates the total sales (total quantity of products sold) per product per month.

Example Input:

sale_idproduct_idsale_datequantityprice_per_unit
1012022-06-08 00:00:00515.0
2022022-06-10 00:00:00320.0
3012022-06-18 00:00:00215.0
4022022-07-26 00:00:00120.0
5012022-07-05 00:00:00615.0

Example Output:

monthproduct_idtotal_sales
617
623
716
721

Answer:


This SQL script uses PostgreSQL's window function to partition data by and , then it sums the quantity for each partition (i.e., for each in each ) to calculate the total sales.

For more window function practice, try this Uber SQL Interview Question within DataLemur's interactive coding environment:

Uber Data Science SQL Interview Question

SQL Question 5: What do the / operators do, and can you give an example?

The / operator is used to return all rows from the first statement that are not returned by the second statement.

Note that is available in PostgreSQL and SQL Server, while is available in MySQL and Oracle (but don't stress about knowing which DBMS supports what exact commands since the interviewers at TD Synnex should be lenient!).

Here's a PostgreSQL example of using to find all of TD Synnex's Facebook video ads with more than 10k views that aren't also being run on YouTube:


If you want to retain duplicates, you can use the operator instead of . The operator will return all rows, including duplicates.

SQL Question 6: Filter Customer Records Based on Business Conditions

TD Synnex, a tech solutions distributor, maintains a database of their customer records. Your task is to write an SQL query to filter down this customer records database. The conditions you need to filter on are:

  • Customers located in Toronto (='Toronto')
  • Their business type is 'IT & Services' (='IT & Services')
  • Their last purchase was made within 30 days from today ( <= NOW() - INTERVAL '30 days')
  • They have a 'High' credit rating (='High')

You'll be working with the table, which is set up as follows:

Example Input:

customer_idnamecitybusiness_typelast_purchase_datecredit_rating
9142Tech KompanyTorontoIT & Services2022-10-05High
4875Generic GroupMontrealRetail2022-11-26Medium
2854Innovation IncTorontoIT & Services2022-11-29High
5876Futuristic FirmTorontoShipping2022-11-25Low
4798Solutions CorpTorontoIT & Services2022-08-07High

Answer:


This query filters down the table based on the mentioned conditions. It uses to apply the main filter, and to combine the different conditions. The function with an interval of '30 days' is used to find records where the is within the past 30 days.

SQL Question 7: What does the SQL keyword do?

The clause in SQL allows you to select records that are unique, eliminating duplicates.

For a tangible example, say you had a table of TD Synnex employees:

first_namejob_title
AkashData Analyst
BrittanyData Scientist
CarlosData Engineer
DiegoData Engineer
EvaData Analyst

If you were doing an HR Analytics project and you wanted to get all the unique job titles that currently worked at the company, you would write the following SQL query:


The output would give you 3 distinct job titles at TD Synnex:

job_title
Data Analyst
Data Scientist
Data Engineer

SQL Question 8: Average Sales by Product Category

As an analyst for TD Synnex, a major IT distributor, you are asked to determine the average sales per category for the past year.

To respond to this request, you will need to use data from two tables:

The table, which contains the sale details such as the , , , and the :

Example Input:

sale_idproduct_idsale_dateamount
6171100106/08/2021500
7802100206/10/2021200
5293100106/18/2021400
6352100207/26/2021300
4517100107/05/2021600

The table, which contains the product details such as the and :

Example Input:

product_idcategory
1001Laptop
1002Desktop

Using these two tables, write a SQL query to calculate the average sales per category.

Answer:


This query calculates the average sales () for each product category (). The tables and are joined over the , and the query only considers the sales data from the past year. The result is grouped by product category.

To practice a very similar question try this interactive Amazon Highest-Grossing Items Question which is similar for calculating highest sales by category or this Wayfair Y-on-Y Growth Rate Question which is similar for analysis of sales data over time.

SQL Question 9: Calculate the Click-Through-Rate for TD Synnex ads

TD Synnex, a large IT distribution company, uses digital ads to attract potential customers. You have been asked to analyze the effectiveness of these ads. In particular, your task is to calculate the Click-Through-Rate (CTR) for the digital ads. You're given two tables: and . The table contains information about each displayed ad, and the table contains information about each ad that was clicked by a user.

Example Input:

ad_iddisplay_dateproduct_id
100106/01/2021 00:00:0050250
100206/07/2021 00:00:0065500
100306/14/2021 00:00:0050250
100406/20/2021 00:00:0065500
100506/27/2021 00:00:0050250

Example Input:

click_idclick_datead_id
200106/01/2021 02:00:001001
200206/07/2021 01:00:001002
200306/14/2021 05:00:001001
200406/20/2021 09:00:001004
200506/28/2021 07:00:001005

Count the total number of times each ad was displayed and clicked.

Answer:


This PostgreSQL query joins and on as it's the common attribute in both tables that represents the digital ads. gives the total number of times each ad was displayed and gives the total number of times each ad was clicked. The Click-Through-Rate (CTR) is then calculated by dividing the number of clicks by the number of displays and multiplying by 100 to express it as a percentage.

To solve a similar problem on DataLemur's free interactive SQL code editor, solve this Facebook SQL Interview question:

Facebook Click-through-rate SQL Question

SQL Question 10: Can you explain the distinction between a clustered and a non-clustered index?

A clustered index is an index where the order of the rows in the database corresponds to the order of the rows in the index. Because of this, a table can only have one clustered index, but it can have multiple non-clustered indexes.

The main difference between the two is that the database tries to keep the data in the same order as the corresponding keys in the clustered index. This can improve the performance of most query operations, as it provides a linear-access path to the data stored in the database.

SQL Question 11: Locate Customer Contacts Information

TD Synnex maintains a customer records database that keeps track of all customer names, contact information, and location details. You're tasked with finding all the customer records that have a Florida-based address. The table has columns for , , , , , and . Assume that the field contains a string with no particular format but always ends with the state of the customer.

Construct a PostgreSQL query that returns all customer records from Florida.

Example Input:

customer_idfirst_namelast_nameemailphone_numberaddress
1JohnDoejdoe@example.com555-555-5555123 Oak Street, Jacksonville, Florida
2JaneSmithjsmith@example.com555-555-5556456 Pine Street, Miami, Florida
3JamesJohnsonjjohnson@example.com555-555-5557789 Maple Street, New York, New York
4LindaWilliamslwilliams@example.com555-555-5558321 Birch Street, Atlanta, Georgia
5MichaelBrownmbrown@example.com555-555-5559654 Cedar Street, Orlando, Florida

Answer:


This query uses the keyword to search for addresses that contain the string 'Florida'. The percent sign () before 'Florida' is a wildcard character that matches any sequence of characters. As a result, any customer record where 'Florida' appears anywhere in the field will be returned by this query. Note that 'Florida' is the last part of the string, according to database design.

TD Synnex SQL Interview Tips

The best way to prepare for a TD Synnex SQL interview is to practice, practice, practice. In addition to solving the earlier TD Synnex SQL interview questions, you should also solve the 200+ SQL Interview Questions on DataLemur which come from companies like Google, Microsoft and Silicon Valley startups.

DataLemur Question Bank

Each exercise has multiple hints, step-by-step solutions and best of all, there's an interactive SQL code editor so you can right online code up your SQL query answer and have it checked.

To prep for the TD Synnex SQL interview you can also be a great idea to solve interview questions from other industrial and electrical distribution companies like:

In case your SQL skills are weak, don't worry about jumping right into solving questions – go learn SQL with this SQL tutorial for Data Scientists & Analysts.

DataLemur SQL Tutorial for Data Science

This tutorial covers things like WHERE vs. HAVING and filtering data with WHERE – both of which show up frequently during SQL job interviews at TD Synnex.

TD Synnex Data Science Interview Tips

What Do TD Synnex Data Science Interviews Cover?

In addition to SQL query questions, the other question categories to practice for the TD Synnex Data Science Interview include:

TD Synnex Data Scientist

How To Prepare for TD Synnex Data Science Interviews?

I believe the optimal way to study for TD Synnex Data Science interviews is to read the book I wrote: Ace the Data Science Interview.

It has 201 interview questions taken from Facebook, Google & startups. The book's also got a crash course covering SQL, Product-Sense & ML. And finally it's helped thousands of people land their dream job in data, which is why it's got over 1000+ 5-star reviews on Amazon.

Ace the Data Science Interview by Nick Singh Kevin Huo

While the book is more technical, it's also crucial to prepare for the TD Synnex behavioral interview. A good place to start is by understanding the company's values and mission.

© 2025 DataLemur, Inc

Career Resources

Free 9-Day Data Interview Crash CourseFree SQL Tutorial for Data AnalyticsSQL Interview Cheat Sheet PDFUltimate SQL Interview GuideAce the Data Job Hunt Video CourseAce the Data Science InterviewBest Books for Data Analysts