11 Intuit SQL Interview Questions (Updated 2024)

Updated on

January 24, 2024

At Intuit, SQL is used to analyze TurboTax and Quickbooks customer data to find bottlenecks in the tax-preparation process . Unsurprisingly this is why Intuit almost always evaluates jobseekers on SQL query questions during interviews for Data Analytics, Data Science, and Data Engineering jobs.

So, if you want to ace the SQL Assessment, here’s 10 Intuit SQL interview questions to practice, which are similar to recently asked questions at Intuit – how many can you solve?

10 Intuit SQL Interview Questions

SQL Question 1: QuickBooks vs TurboTax

Intuit provides a range of tax filing products, including TurboTax and QuickBooks, available in various versions.

Write a query to determine the total number of tax filings made using TurboTax and QuickBooks. Each user can file taxes once a year using only one product.

If you find this question interesting, you may also want to try a similar question called Laptop vs Mobile Viewers!

Table:

Column NameType
filing_idinteger
user_idvarchar
filing_datedatetime
productvarchar

Example Input:

filing_iduser_idfiling_dateproduct
114/14/2019TurboTax Desktop 2019
214/15/2020TurboTax Deluxe
314/15/2021TurboTax Online
424/07/2020TurboTax Online
524/10/2021TurboTax Online
634/07/2020TurboTax Online
734/15/2021TurboTax Online
833/11/2022QuickBooks Desktop Pro
944/15/2022QuickBooks Online

Example Output:

turbotax_totalquickbooks_total
72

Answer:

Using the PostgreSQL Query:


To solve this question on DataLemur's free interactive SQL code editor, attempt this Intuit SQL interview question: Intuit SQL Interview Question

SQL Question 2: Find the Average Ratings of Each Product per Month

As a part of the customer experience team in Intuit, you are tasked with analyzing customer reviews of different products. Given a "reviews" table with the following columns:

  • (an integer that serves as the unique identifier for a review)
  • (an integer that serves as the unique identifier for a user)
  • (a date that shows when a user submitted a review)
  • (an integer that serves as the unique identifier for a product)
  • (an integer from 1-5 that shows how a user rated a product)

Write a SQL query that returns the average rating () of each product () for each month of submission (). The result should be ordered by the month in ascending order, then by product id in ascending order. The month of submission should be in the format of MM/YYYY.

Example Input:
review_iduser_idsubmit_dateproduct_idstars
617112306/08/2022500014
780226506/10/2022698524
529336206/18/2022500013
635219207/26/2022698523
451798107/05/2022698522

Answer:


The SQL query uses the function to calculate the average star ratings for each product per month. The function is used to format the to 'MM/YYYY'. The result is grouped by month and product id, and ordered by the same.

To solve another question about calculating rates, solve this TikTok SQL question within DataLemur's online SQL code editor:

TikTok SQL Interview Question

SQL Question 3: Consecutive Filing Years

Intuit, a company known for its tax filing products like TurboTax and QuickBooks, offers multiple versions of these products.

Write a query that identifies the user IDs of individuals who have filed their taxes using any version of TurboTax for three or more consecutive years. Each user is allowed to file taxes once a year using a specific product. Display the output in the ascending order of user IDs.

Table:

Column NameType
filing_idinteger
user_idvarchar
filing_datedatetime
productvarchar

Example Input:

filing_iduser_idfiling_dateproduct
114/14/2019TurboTax Desktop 2019
214/15/2020TurboTax Deluxe
314/15/2021TurboTax Online
424/07/2020TurboTax Online
524/10/2021TurboTax Online
634/07/2020TurboTax Online
734/15/2021TurboTax Online
833/11/2022QuickBooks Desktop Pro
944/15/2022QuickBooks Online

Example Output:

user_id
1

Answer:


Try solving this Intuit SQL question on DataLemur!

Intuit SQL Interview Question

SQL Question 4: Tax Tracking System

Imagine you are working for a gigantic corporation like Intuit which manages the accounts of millions of customers. One of the primary services Intuit provides is tax computation and tracking. Let's say the data structure is such that each customer can have multiple accounts, and each account can have multiple tax records for different years.

Design a schema for such a system, and then write a SQL query to find the total tax amount paid by each customer in the year 2020.

customer_idfull_nameemail
1John Doejhondoe@example.com
2Jane Smithjanesmith@example.com
3David Warnerdavidwarner@example.com

account_idcustomer_idaccount_type
101Savings
111Investment
202Savings
212Investment
303Savings

tax_idaccount_idtax_yeartax_amount
10011020205000
10021020215500
10031120202000
10041120212200
20012020206000
20022020216600
30013020207000

Answer:


This SQL query joins the , , and tables using the foreign keys and and then groups the result by of the customer. After grouping, it calculates the sum of paid by each customer in the year 2020.

To practice a similar problem about calculating rates, try this SQL interview question from TikTok within DataLemur's online SQL code editor: TikTok SQL Interview Question

SQL Question 5: In the context of a database transaction, what does ACID mean?{#Question-5}

A transaction is a one or more SQL commands which are executed as a singular unit if the transaction -commits- (or no execution hapens if the transaction -aborts-).

For transactions, a DBMS is supposed to enforce the follwing ACID properties: Atomicity, Consistency, Isolation, & Durability.

Here's what each one means:

  • Atomicity: the transaction is completed in an all-or-nothing way (no partial commits)
  • Consistency: the transaction is valid and follows all constraints and restrictions
  • Isolation: the transaction doesn't affect another transaction
  • Durability: the committed transactions is stored permanently in the DB (it doesn't dissapear!)

As you can see, it's pretty important for the multiple databases where Intuit store's it's data to be ACID-compliant!

SQL Question 6: Customer Transactions Filtering

As a Data Analyst at Intuit, you are asked to generate a report for the marketing team. They want to know all the customers who have purchased a specific product, 'Tax Software', in all years but have not made any purchases in the current year, 2022.

Below are the sample tables representing the customer records and products databases:

Example Input:
transaction_idcustomer_idproduct_idpurchase_date
100150010101/14/2019
100250110206/30/2018
100350210103/24/2020
100450010112/31/2021
100550110305/21/2019
100650210106/05/2022
Example Input:
product_idproduct_name
101Tax Software
102Accounting Software
103Workflow Software

Answer:

Here is the PostgreSQL query to solve the problem:


This query works by initially filtering for transactions with the product_name 'Tax Software' and were purchased before 2022. From this subset, it 'subtracts' (using NOT IN) any customers who have any transactions in 2022 through a subquery. This results in a list of customers who have purchased the Tax Software in all years but not in 2022.

To solve a similar problem on DataLemur's free online SQL code editor, try this Facebook SQL Interview question: Facebook Click-through-rate SQL Question

SQL Question 7: Could you explain what a self-join is?{#Question-7}

A self-join is a type of join in which a table is joined to itself. To perform a self-join, you need to specify the table name twice in the FROM clause, and give each instance of the table a different alias. You can then join the two instances of the table using a JOIN clause, and use a WHERE clause to specify the relationship between the rows.

Self-joins are the go-to technique for any data analysis that involves pairs of the same thing, like identifying pairs of products that are frequently purchased together like in this Walmart SQL interview question.

For another example, say you were doing an HR analytics project and needed to analyze how much all Intuit employees in the same department interact with each other. Here's a self-join query you could use to retrieve all pairs of Intuit employees who work in the same department:


This query returns all pairs of Intuit employees who work in the same department, and excludes pairs where the employee's id is the same (since this would represent the same Intuit employee being paired with themselves).

SQL Question 8: Find the Average Monthly Expense for Each User

As a data analyst at Intuit, you are tasked with finding the average monthly expense for each user. Intuit is a business and financial software company that develops and sells financial, accounting, and tax preparation software. One of its products, for instance, allows users to track their expenses.

You are provided with a database which tracks the made by each user. Each record in the table has an , a , a , and a .

Example Input:
expense_iduser_idpurchase_datepurchase_amount
11002022-01-0320
21012022-01-0535
31002022-02-1055
41002022-02-1525
51022022-01-2060
61002022-03-0175
71012022-03-0515
Example Output:
user_idmonthavg_expense
100120.00
100240.00
100375.00
101135.00
101315.00
102160.00

Answer:


This SQL statement first uses the function to get the month of each purchase date. Then it groups the data by and , and applies the aggregate function on to calculate the average expense per month for each user. The ordering is done on and for better readability of the output.

To practice a similar SQL problem on DataLemur's free online SQL code editor, try this Meta SQL interview question: Facebook Click-through-rate SQL Question

SQL Question 9: Finding Customers with "Tax" in Their Email

Suppose you are working on the customer relations team at Intuit and you are assigned to send emails related to tax updates. You have been given the task to find customers whose email addresses contain the word "tax". For this exercise, making the assumption that customer emails are stored in lower-case, you need to write a SQL query to filter out customers with "tax" included in their email addresses.

Example Input:
customer_idfull_nameemail_addresssignup_date
125John Smithjohnsmith@gmail.com01/03/2021
257Anna Brownannatax@gmail.com02/21/2022
562Mark Johnsonmark.j.tax@gmail.com11/18/2022
945Sarah Millersarahmiller@yahoo.com05/12/2022
112Ronald Davisronalddavis@outlook.com03/28/2021

Answer:


This query uses the LIKE keyword in SQL to find all customers whose email addresses contain the string "tax". The '%' symbol is a wildcard in SQL which may represent zero, one, or multiple characters. So, the condition will match any email address that contains "tax" anywhere in the string, whether it's at the beginning, middle, or end. Running this query on the database will return all records where the customer's email address includes "tax".

To practice a related problem on DataLemur's free interactive SQL code editor, attempt this Meta SQL interview question: Meta SQL interview question

SQL Question 10: How do the and window functions differ from each other?

In SQL, both and are used to rank rows within a result set. The key difference between the two functions is how deal with two or more rows having the same value in the ranked column (aka how the break ties).

RANK(): When there's a tie, leaves a gap in the ranking. For example, if three rows are tied for 2nd place, the RANK() function will assign a rank of 2 to the first of these rows, a rank of 3 to the second row, and a rank of 4 to the third row.

DENSE_RANK(): For ties, does not leave a gap in the ranking. Instead, it assigns the same rank to all tied rows, and then makes the next row 1 bigger. Confusing, I know, but here's an example to make it more clear: if three rows are tied for 3rd place, the function will assign a rank of 3 to all three rows, and then assign a rank of 4 to the next row.

Intuit SQL Interview Tips

Assuming that you've already got basic SQL skills, the next best tip we have to prepare for the Intuit SQL interview is to solve as many practice SQL interview questions as you can! Besides solving the above Intuit SQL interview questions, you should also solve the 200+ SQL questions from real Data Science & Analytics interviews which come from companies like Google, Microsoft and Silicon Valley startups. DataLemur SQL Interview Questions

Each SQL question has hints to guide you, full answers and crucially, there is an interactive coding environment so you can right in the browser run your SQL query answer and have it checked.

To prep for the Intuit SQL interview you can also be helpful to practice SQL problems from other tech companies like:

However, if your SQL query skills are weak, forget about diving straight into solving questions – strengthen your SQL foundations with this SQL tutorial for Data Scientists & Analysts.

SQL tutorial for Data Analytics

This tutorial covers SQL concepts such as filtering groups with HAVING and Subquery vs. CTE – both of which show up frequently during SQL job interviews at Intuit.

Intuit Data Science Interview Tips

What Do Intuit Data Science Interviews Cover?

For the Intuit Data Science Interview, beyond writing SQL queries, the other types of questions to practice:

  • Probability & Stats Questions
  • Coding Questions in Python or R
  • Business Sense and Product-Sense Questions
  • Machine Learning and Predictive Modeling Questions
  • Behavioral & Resume-Based Questions

Intuit Data Scientist

How To Prepare for Intuit Data Science Interviews?

The best way to prepare for Intuit Data Science interviews is by reading Ace the Data Science Interview. The book's got:

  • 201 Interview Questions from FAANG (FB, Apple, Amazon, Netflix, Google)
  • A Refresher on SQL, Product-Sense & ML
  • Great Reviews (900+ reviews, 4.5-star rating)

Ace the Data Science Interview Book on Amazon

© 2024 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