Data Analytics, Data Science, and Data Engineering employees at Thrivent uses SQL to analyze and manage financial data sets, including investment portfolios and policyholder assets, as well as creating custom queries for strategic decision-making in accordance with Lutheran principles, such as evaluating social responsibility initiatives. That is the reason why Thrivent asks SQL problems. during job interviews.
To help you study for the Thrivent SQL interview, we've collected 11 Thrivent Financial for Lutherans SQL interview questions – can you solve them?
Thrivent Financial is a well-known financial services company. Identifying customers who have made large and frequent investments is crucial for Thrivent Financial to implement tailored customer retention strategies and special service offers.
The SQL interview question would be: Write a SQL query to identify the top 5 customers who have made the most frequent and high-volume investments in the past year.
investment_id | customer_id | investment_date | investment_amount |
---|---|---|---|
1001 | 200 | 2021-06-01 | 5000 |
1002 | 200 | 2021-07-10 | 10000 |
1003 | 300 | 2021-07-25 | 7000 |
1004 | 400 | 2021-08-15 | 3000 |
1005 | 500 | 2021-10-10 | 2000 |
1006 | 300 | 2021-12-20 | 5000 |
1007 | 600 | 2022-01-05 | 4000 |
1008 | 200 | 2022-02-14 | 6000 |
1009 | 500 | 2022-03-17 | 3000 |
1010 | 300 | 2022-04-12 | 6000 |
We can use the function to count total volume of activities per each customer, and the function to calculate the total investment amounts. Then, we use in combination with to get the top 5 customers.
This query first filters out the investments made in the past year. Then, groups the investments by customer_id, and calculates the total number and amount of investments made by each customer. By ordering based on both the frequency and amount of investments in descending order and limiting the results to 5, we get the list of top 5 power investors.
To work on another SQL customer analytics question where you can solve it interactively and have your SQL query automatically checked, try this Walmart SQL Interview Question:
Imagine there was a table of Thrivent employee salary data. Write a SQL query to find the top three highest paid employees in each department.
employee_id | name | salary | department_id |
---|---|---|---|
1 | Emma Thompson | 3800 | 1 |
2 | Daniel Rodriguez | 2230 | 1 |
3 | Olivia Smith | 2000 | 1 |
4 | Noah Johnson | 6800 | 2 |
5 | Sophia Martinez | 1750 | 1 |
8 | William Davis | 6800 | 2 |
10 | James Anderson | 4000 | 1 |
department_id | department_name |
---|---|
1 | Data Analytics |
2 | Data Science |
department_name | name | salary |
---|---|---|
Data Analytics | James Anderson | 4000 |
Data Analytics | Emma Thompson | 3800 |
Data Analytics | Daniel Rodriguez | 2230 |
Data Science | Noah Johnson | 6800 |
Data Science | William Davis | 6800 |
Try this problem interactively on DataLemur:
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 hard to understand, you can find a step-by-step solution with hints here: Top 3 Department Salaries.
Denormalization is the process of modifying a database schema in a way that deviates from the typical rules of normalization (1NF, 2NF, 3NF, etc.). There's a few reasons to denormalize a database:
Improved performance: Joins are slow AF, especially when dealing with the massive datasets that are typically used at Thrivent. Denormalization can improve the performance of a database by reducing the number of joins that are required to retrieve data. This can be particularly useful when the database is being used for querying and reporting purposes, as joins can be expensive and slow.
Scalability: By reducing the amount of data that needs to be read and processed to execute a query, denormalization can enhance the scalability of a database. This can be useful when the database is anticipated to handle a large number of read-only queries (such as in OLAP use cases).
Ease of use: Denormalization can also make it easier for users to work with a database by providing them with a more intuitive and straightforward data model.
Because denormalization can create more complex update and delete operations, and pose potential data integrity issues, consider denormalization only if joins are causing performance bottlenecks.
Thrivent is a financial organization that provides insurance and other investment products to its customers. Let us say we would like to analyze the monthly average premium of various insurance products of the company.
Assume we have a table where each row represents a payment made by a user for insurance premiums. The table fields are: (unique identifier), (identifier of the user), (date when the payment was made), (identifier for the product), (payment amount).
Your goal is to write a SQL query to determine the monthly average premium by product.
premium_id | user_id | payment_date | product_id | amount |
---|---|---|---|---|
1012 | 134 | 01/01/2021 | 30001 | 150 |
1432 | 567 | 02/05/2021 | 30001 | 130 |
2132 | 187 | 02/10/2021 | 40002 | 200 |
3013 | 785 | 02/15/2021 | 30001 | 175 |
4315 | 562 | 03/20/2021 | 40002 | 220 |
month | product | avg_premium |
---|---|---|
1 | 30001 | 150.00 |
2 | 30001 | 152.50 |
2 | 40002 | 200.00 |
3 | 40002 | 220.00 |
The SQL query to solve this would be:
The query works by first extracting the month from the using the function. It then groups by the extracted month and to calculate the average of the field for each group, giving the average premium paid per product per month. The results are ordered by the month and product for easier visualization.
To practice a related window function SQL problem on DataLemur's free online SQL code editor, solve this Google SQL Interview Question:
A constraint ensures that all values in a column are different. It is often used in conjunction with other constraints, such as NOT NULL, to ensure that the data meets certain conditions.
For example, if you had Thrivent employee data stored in a database, here's some constraints you'd use:
In the Thrivent employee example, the UNIQUE constraint is applied to the "email" field to ensure that each employee has a unique email address. This helps to ensure the integrity of the data in the database and prevents errors that could occur if two employees had the same email address.
Thrivent is a financial services organization that provides investment and insurance products. They want to track the performance of their different customer portfolios by quarter over a range of years and assess their average return on investments. You are tasked to design the necessary tables to capture this information. The required tables would include details like , , and .
Additionally, write a PostgreSQL query to retrieve the average return on investment by quarter for each year.
Please find the database design and related query as per your request:
account_id | customer_id | account_type |
---|---|---|
10001 | 401 | Savings |
10002 | 654 | Personal |
10003 | 904 | IRA |
10004 | 120 | 401K |
10005 | 302 | Personal |
investment_id | account_id | investment_type | investment_amount |
---|---|---|---|
5001 | 10004 | Bonds | 50000 |
5002 | 10001 | Stocks | 40000 |
5003 | 10005 | Mutual Funds | 80000 |
5004 | 10003 | Real Estate | 60000 |
5005 | 10002 | Bonds | 55000 |
investment_id | year | quarter | return_amount |
---|---|---|---|
5001 | 2021 | 1 | 3000 |
5001 | 2021 | 2 | 2500 |
5001 | 2021 | 3 | 4000 |
5002 | 2021 | 1 | 2600 |
5002 | 2021 | 2 | 2900 |
5002 | 2021 | 3 | 2700 |
This SQL query joins the and table on to relate the investment made and the return received per quarter. It then computes the average return on investment in percentage form, groups the data by year and quarter, and orders it likewise.
The SQL command merges the results of multiple statements and keeps only those rows that are present in all sets.
For example, say you were doing an HR Analytics project for Thrivent, and had access to Thrivent's employees and contractors 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 contractors who also show up in the employees table:
Suppose you are working in the finance department at Thrivent. You have been asked to pull out some insights from the customer purchase data. Specifically, you need to determine the average purchase amounts per customer.
purchase_id | customer_id | purchase_date | purchase_amount |
---|---|---|---|
897 | 489 | 01/05/2022 | 235.67 |
968 | 698 | 01/07/2022 | 189.34 |
732 | 382 | 01/12/2022 | 124.45 |
655 | 209 | 01/15/2022 | 299.99 |
426 | 489 | 01/30/2022 | 124.33 |
customer_id | name | sign_up_date |
---|---|---|
489 | John Doe | 12/31/2020 |
698 | Jane Smith | 03/20/2021 |
382 | Robert Johnson | 05/05/2021 |
209 | Susan Williams | 02/25/2021 |
This means to find out the average purchase amounts per customer, the SQL query would look like this:
The query above would return a list of purchase amount means for each customer who has participated in a purchasing event. The function is used in conjunction with the clause to find out the average purchase amount per customer.
To practice a very similar question try this interactive Amazon Highest-Grossing Items Question which is similar for "calculating the top sales" or this Walmart Histogram of Users and Purchases Question which is similar for "calculating total purchases per user".
Thrivent would like to analyze the click-through rates (CTR) for their digital ads and conversion rates in their product viewing to cart-add process. The former involves the ratio of the number of users who clicked on a particular ad over the total ad impressions. The latter meanwhile involves the ratio of users who added a product to the cart versus the ones who just viewed it.
We have two tables here:
impression_id | user_id | ad_id | timestamp |
---|---|---|---|
101 | 234 | 10 | 06/09/2023 11:00:00 |
102 | 675 | 15 | 06/10/2023 09:15:00 |
103 | 123 | 10 | 06/10/2023 10:05:00 |
104 | 567 | 15 | 06/11/2023 14:45:00 |
105 | 111 | 20 | 06/12/2023 19:30:00 |
click_id | user_id | ad_id | timestamp |
---|---|---|---|
201 | 234 | 10 | 06/09/2023 11:05:00 |
202 | 123 | 10 | 06/10/2023 10:07:00 |
view_id | user_id | product_id | timestamp |
---|---|---|---|
301 | 125 | 50 | 06/10/2023 10:08:00 |
302 | 675 | 55 | 06/11/2023 10:15:00 |
303 | 987 | 60 | 06/12/2023 14:46:00 |
304 | 456 | 50 | 06/13/2023 19:31:00 |
cart_id | user_id | product_id | timestamp |
---|---|---|---|
401 | 125 | 50 | 06/10/2023 10:10:00 |
402 | 987 | 60 | 06/12/2023 14:48:00 |
For the CTR of digital ads:
For the click-through conversion rates from viewing a product to adding a product to a cart:
In the first query, we calculate the click-through rate for each ad by dividing the count of clicks on each ad by the number of times it was shown. In the second query, we calculate the conversion rate for each product by counting how often a product was added to the cart versus how often it was just viewed.
To solve another question about calculating rates, solve this TikTok SQL question on DataLemur's interactive coding environment:
A is a field in a table that references the of another table. It creates a link between the two tables and ensures that the data in the field is valid.
Say for example you had sales analytics data from Thrivent's CRM (customer-relationship management) tool.
The FOREIGN KEY constraint ensures that the data in the field of the "opportunities" table is valid, and prevents the insertion of rows in the table that do not have corresponding entries in the table. It also helps to enforce the relationship between the two tables and can be used to ensure that data is not deleted from the accounts table if there are still references to it in the table.
As Thrivent is a not-for-profit financial services organization, a data analysis question could involve querying their customer data to understand the distribution of account balances by account type.
Suppose we have a table that contains the following columns:
account_id | customer_id | account_type | balance |
---|---|---|---|
3456 | 786 | Investment | 15000 |
9078 | 234 | Savings | 7000 |
1294 | 912 | Investment | 25000 |
6589 | 234 | Investment | 17000 |
4567 | 567 | Savings | 5000 |
The goal is to calculate the average balance by account type.
This query takes the table, groups it by the , and then calculates the average for each group.
account_type | avg_balance |
---|---|
Investment | 19000 |
Savings | 6000 |
The result will give us the average balance for each type of account. It shows that the average Investment account balance is 6,000. This type of information could be useful for Thrivent for marketing, planning, and investment decisions.
The best way to prepare for a Thrivent SQL interview is to practice, practice, practice. In addition to solving the above Thrivent SQL interview questions, you should also solve the 200+ SQL Interview Questions on DataLemur which come from companies like FAANG tech companies and tech startups.
Each exercise has multiple hints, step-by-step solutions and most importantly, there's an online SQL code editor so you can instantly run your SQL query and have it graded.
To prep for the Thrivent SQL interview you can also be a great idea to solve SQL questions from other insurance companies like:
Dive into the latest news and insights from Thrivent and discover how they're making a positive impact on communities!
In case your SQL coding skills are weak, forget about going right into solving questions – refresh your SQL knowledge with this interactive SQL tutorial.
This tutorial covers topics including HAVING and handling timestamps – both of these come up frequently in SQL job interviews at Thrivent.
Besides SQL interview questions, the other types of problems tested in the Thrivent Data Science Interview include:
To prepare for Thrivent Data Science interviews read the book Ace the Data Science Interview because it's got:
Don't forget about the behavioral interview – prep for it using this guide on acing behavioral interviews.