At Dassault Systemes, SQL is used quite frequently for analyzing complex engineering data for improved product design, and managing customer data for personalized software development. Unsurprisingly this is why Dassault Systemes often tests SQL problems during interviews for Data Analyst, Data Science, and BI jobs.
So, if you're stressed about an upcoming SQL Assessment, we've curated 11 Dassault Systemes SQL interview questions to practice, which are similar to recently asked questions at Dassault Systemes – how many can you solve?
Dassault Systemes offers various products including CAD software, PLM solutions, and 3D design software, valuable to many industries like automotive, aerospace and industrial equipment. A "power user" or "VIP user" in this context could be defined as the customers who are frequently buying or renewing licenses for these products.
Your task is to write a SQL query to identify customers who have bought or renewed licenses more than five times in the last six months.
purchase_id | customer_id | purchase_date | product_id | licenses |
---|---|---|---|---|
101 | 123 | 01/08/2022 00:00:00 | 50001 | 20 |
202 | 265 | 02/20/2022 00:00:00 | 69852 | 15 |
303 | 123 | 02/09/2022 00:00:00 | 50001 | 25 |
404 | 362 | 04/18/2022 00:00:00 | 50001 | 10 |
505 | 265 | 07/26/2022 00:00:00 | 69852 | 15 |
606 | 192 | 07/05/2022 00:00:00 | 69852 | 20 |
707 | 123 | 06/20/2022 00:00:00 | 50001 | 30 |
customer_id | product_id | total_licenses_purchased_last_6_months |
---|---|---|
123 | 50001 | 75 |
265 | 69852 | 30 |
This query firstly filters out the records of the latest 6 months, groups the dataset by customer and product, and calculates the sum of licenses bought or renewed by each customer for every product. The result is then further filtered to include only those customers who have bought or renewed more than five licenses.
To practice a similar SQL problem on DataLemur's free interactive SQL code editor, solve this Meta SQL interview question:
"Dassault Systemes" sells a variety of software products. There is a requirement to analyze monthly sales for each product, more specifically, compute the total sales and the average product price for each month and for each product.
You are given a "sales" table containing information about each sale. Each product has a unique product_id. The sale_date is in the format 'YYYY-MM-DD'.
You are required to write a SQL query that outputs the total sales and average product price for each month and for each product, sorted by the months in ascending order.
sale_id | product_id | price | sale_date |
---|---|---|---|
1001 | S590 | 500 | 2022-01-15 |
1002 | S591 | 700 | 2022-01-20 |
1003 | S590 | 500 | 2022-02-10 |
1004 | S591 | 700 | 2022-02-16 |
1005 | S590 | 500 | 2022-02-23 |
1006 | S591 | 700 | 2022-03-01 |
month | product_id | total_sales | avg_price |
---|---|---|---|
01 | S590 | 1 | 500 |
01 | S591 | 1 | 700 |
02 | S590 | 2 | 500 |
02 | S591 | 1 | 700 |
03 | S591 | 1 | 700 |
WRITEUP_OF_ANSWER: This query first extracts the month from the sale_date using the TO_CHAR() function. It then calculates the count (total_sales) and average price (avg_price) for each product in each month, using the GROUP BY clause. The results are then sorted by the months in ascending order. The COUNT() function is used to compute the total number of sales, and the AVG() function is used to calculate the average product price.
To solve a related SQL problem on DataLemur's free online SQL code editor, try this Facebook SQL Interview question:
The clause is used to filter the groups created by the clause. It's similar to the clause, but it is used to specify conditions on the groups created by the clause, rather than on the individual rows of the table.
For example, say you were analyzing salaries for analytics employees at Dassault Systemes:
This query retrieves the total salary for each Analytics department at Dassault Systemes and groups the rows by the specific department (i.e. ""Marketing Analytics"", ""Business Analytics"", ""Sales Analytics"" teams).
The clause then filters the groups to include only Dassault Systemes departments where the total salary is greater than $1 million
Dassault Systemes, a multinational software company, is keen on understanding the resource utilization of their project teams. They want to analyze how often each software development kit (SDK) has been used in their projects and which software engineer has used them, with the goal of resource optimization.
In order to analyze this, you have two tables: and .
project_id | project_name | sdk_id | engineer_id |
---|---|---|---|
1000 | Gridworld | 5000 | 600 |
1001 | Weather App | 5001 | 601 |
1002 | E-commerce Website | 5000 | 602 |
1003 | Flight Tracker Mobile App | 5002 | 603 |
1004 | Finance Management System | 5001 | 603 |
table keeps the record of Project ID, Name of the Project, SDK ID used in the project, and the ID of the engineer who worked on the project.
engineer_id | engineer_name | hire_date |
---|---|---|
600 | Laura Simpson | 2018-09-15 |
601 | James Wagner | 2019-05-01 |
602 | Joseph Matthews | 2017-11-20 |
603 | Catherine Brown | 2020-02-15 |
table keeps the records of Engineer ID, Name of the Engineer and the date when the engineer was hired.
You are required to write a PostgreSQL query to list out all the projects, the respective SDK used in each project, the name of the engineer who is assigned the project and the date when the engineer was hired.
This SQL query joins both the table (aliased as 'p') and table (aliased as 'e') using the as the common key. It then selects , , , and from the joined table to display the required data.
To solve a related SQL problem on DataLemur's free interactive SQL code editor, attempt this Meta SQL interview question:
The EXCEPT operator is used to return all rows from the first SELECT statement that are not returned by the second SELECT statement. Note that is available in PostgreSQL and SQL Server, and it's equivalent operator is called and is available in MySQL and Oracle.
For a tangible example, suppose you were doing an HR Analytics project for Dassault Systemes, and had access to Dassault Systemes's contractors and employees data. Assume that some employees were previously contractors, and vice versa, and thus would show up in both tables. You could use operator to find all employees who never were a contractor using this query:
"Dassault Systemes" is a software company; one area they would care about is the efficiency of their customer support. Let's say you are asked to find the average time taken to resolve support tickets.
table:
ticket_id | issue_report_date | issue_resolve_date |
---|---|---|
101 | 01/11/2023 00:00:00 | 03/11/2023 00:00:00 |
102 | 02/11/2023 00:00:00 | 03/11/2023 00:00:00 |
103 | 04/11/2023 00:00:00 | 05/11/2023 00:00:00 |
104 | 06/11/2023 00:00:00 | 10/11/2023 00:00:00 |
105 | 08/11/2023 00:00:00 | 13/11/2023 00:00:00 |
We first need to calculate the time to resolve each ticket, and then compute the average of these durations.
This query calculates the average resolution time for tickets in the provided data. The function is used to prevent negative intervals in case any ticket's resolve date is earlier than its report date (which should not happen in a correct dataset). Note that the data type is interval day to second, because we are calculating a duration, not a specific date or time.
To solve a similar SQL interview question on DataLemur's free interactive coding environment, attempt this SQL interview question asked by Facebook:
The clause in SQL allows you to select records that are unique, eliminating duplicates.
For example, if you had a table of Dassault Systemes employees, and wanted to see what are all the unique job titles that currently worked at the company, you could write the following query:
Given the table that records when a user clicks on a Dassault Systemes' digital ad and the table that records when a user adds a product to their cart after viewing it, calculate the click-through rate and the click-through conversion rate for a given month.
Assume each click and conversion has a timestamp and the ads and products are identified by unique IDs.
click_id | user_id | click_time | ad_id |
---|---|---|---|
101 | 1234 | 06/08/2022 00:10:00 | 3001 |
102 | 2345 | 06/08/2022 00:20:00 | 4001 |
103 | 3456 | 06/18/2022 00:30:00 | 3001 |
104 | 4567 | 07/06/2022 01:10:00 | 4001 |
105 | 5678 | 07/06/2022 01:20:00 | 3001 |
convert_id | user_id | convert_time | product_id |
---|---|---|---|
2001 | 1234 | 06/08/2022 00:15:00 | 5001 |
2002 | 2345 | 06/08/2022 00:30:00 | 6001 |
2003 | 4567 | 07/06/2022 01:20:00 | 5001 |
2004 | 5678 | 07/31/2022 02:00:00 | 6001 |
This query first counts the total number of clicks in each month ( subquery) and the total conversions in each month ( subquery). Then, it joins these two subqueries on the field and calculates the conversion rate by dividing by .
To practice another question about calculating rates, try this SQL interview question from TikTok within DataLemur's online SQL coding environment:
Dassault Systemes wants to understand more about their customer base. Specifically, they wish to know how many customers have used a particular set of corporate email domains for their registration. Assume the domains they are interested in are "@dassault-systemes.com", "@3ds.com" and "@catia.com". Write a SQL query to find all customer records where the email ID ends with one of these domains.
Here is a sample input table for your reference:
customer_id | first_name | last_name | |
---|---|---|---|
101 | John | Doe | john.doe@dassault-systemes.com |
102 | Jane | Smith | jane.smith@3ds.com |
103 | Bill | Murray | bill.murray@catia.com |
104 | Charlie | Brown | charlie.brown@gmail.com |
105 | Lucy | Van Pelt | lucy.vanpelt@yahoo.com |
This query uses the LIKE operator and string matching to filter records based on the given criterion. It will retrieve all records where the email field ends with either "@dassault-systemes.com", "@3ds.com" or "@catia.com". For instance, "john.doe@dassault-systemes.com", "jane.smith@3ds.com" and "bill.murray@catia.com". Customers with other email domains like "charlie.brown@gmail.com" and "lucy.vanpelt@yahoo.com" will not be included in the result.
To solve a related SQL interview question on DataLemur's free interactive SQL code editor, solve this Meta SQL interview question:
The COALESCE() function returns the first non-NULL value from a list of values. This function is often used to replace a NULL with some default value, so that you can then take a or of some column without NULLs messing things up.
For example, suppose you ran a customer satisfaction survey for Dassault Systemes and had statements like "I'd buy from Dassault Systemes again". In the survey, customers would then answer how strongly they agreed with a statement on a scale of 1 to 5 (strongly disagree, disagree, neutral, agreee, strongly agree).
Because attention spans are short, many customers skipped many of the questions, and thus our survey data might be filled with NULLs:
customer_id | question_id | agree_scale |
---|---|---|
101 | 1 | 4 |
101 | 2 | 5 |
202 | 1 | 4 |
202 | 2 | NULL |
303 | 1 | 5 |
303 | 2 | NULL |
Before doing further analytics on this customer survey data, you could replace the NULLs in the column with the value of (because that corresponds to the default 'neutral' answer) using the function:
This would result in the following:
customer_id | question_id | agree_scale |
---|---|---|
101 | 1 | 4 |
101 | 2 | 5 |
202 | 1 | 4 |
202 | 2 | 3 |
303 | 1 | 5 |
303 | 2 | 3 |
Dassault Systemes wants to assess customer spending habits across different countries. The company has two tables in their database: the table that contains customer data effectively linked with the countries they're from, and the table that provides insights into each customer's orders.
Your task is to write a SQL query that returns the top 3 customers with the highest total order amount from each country.
Example Input:
Example Input:
This SQL query first calculates the total spending for each customer using a subquery and a operation. The window function is then used to rank customers within each country based on their total spending. The outer query filters out only the top 3 customers from each country.
To solve a related SQL interview question on DataLemur's free online SQL code editor, solve this Meta SQL interview question:
Assuming that you've already got basic SQL skills, the next best tip we have to prepare for the Dassault Systemes SQL interview is to solve as many practice SQL interview questions as you can! Besides solving the earlier Dassault Systemes SQL interview questions, you should also solve the 200+ SQL coding questions which come from companies like Microsoft, Google, and Facebook.
Each interview question has hints to guide you, step-by-step solutions and crucially, there is an interactive coding environment so you can right in the browser run your query and have it graded.
To prep for the Dassault Systemes SQL interview it is also a great idea to solve SQL questions from other tech companies like:
However, if your SQL skills are weak, forget about going right into solving questions – strengthen your SQL foundations with this interactive SQL tutorial.
This tutorial covers things like 4 types of JOINS and CASE/WHEN statements – both of which show up routinely during Dassault Systemes SQL interviews.
For the Dassault Systemes Data Science Interview, besides SQL questions, the other types of questions to practice:
The best way to prepare for Dassault Systemes Data Science interviews is by reading Ace the Data Science Interview. The book's got: