logo

11 Edward Jones SQL Interview Questions (Updated 2024)

Updated on

June 30, 2024

At Edward Jones Investments, SQL is used for analyzing financial data trends and optimizing portfolio management strategies based on data-driven insights. Because of this, Edward Jones LOVES to ask SQL query questions during interviews for Data Science and Data Engineering positions.

Thus, to help prep you for the Edward Jones SQL interview, here's 11 Edward Jones Investments SQL interview questions in this blog.

=B69 & " SQL Interview Questions"

11 Edward Jones Investments SQL Interview Questions

SQL Question 1: Identify High-Investment Customers

Write a SQL query to identify customers who have invested more than $100,000 in stocks at "Edward Jones" in the last calendar year. For this question, assume we have two tables - one table called that records every purchase of a stock by a customer with the cost of those stocks, and a second table called that has details about the customers.

Example Input:
customer_idlast_namefirst_name
101SmithJohn
102JohnsonSarah
103BrownDavid
104TaylorJessica
105MillerMichael
Example Input:
transaction_idcustomer_idtransaction_datestock_idcost
50501012021-04-22100125000.00
60601022021-02-11200115000.00
70701022021-12-30200190000.00
80801032020-12-31100230000.00
90901042022-01-01200260000.00

Answer:


This query joins the and tables on the field, limiting to transactions that occurred in the last calendar year. The clause groups the data by each customer. The clause then filters out those customers whose total investment (sum of the cost of all their transactions) over the specified period is less than $100,000. Finally, the clause orders the remaining customers by descending total investment, putting the highest investing customers at the top.

To practice a related super-user data analysis question on DataLemur's free online SQL code editor, try this recently asked Microsoft SQL interview question: Microsoft SQL Interview Question: Teams Super User

SQL Question 2: Top 3 Department Salaries

Given a table of Edward Jones employee salary data, write a SQL query to find the top three highest paid employees in each department.

Edward Jones 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

Code your solution to this problem 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 detailed solution with hints here: Top 3 Department Salaries.

SQL Question 3: What distinguishes an inner join from a full outer join?

A full outer join returns all rows from both tables, including any unmatched rows, whereas an inner join only returns rows that match the join condition between the two tables.

For a tangible example, suppose you had a table of Edward Jones orders and Edward Jones customers.

Here's a SQL inner join using the orders and customers tables:


This query will return rows from the orders and customers tables that have matching values. Only rows with matching values will be included in the results.

Here is an example of a using the orders and customers tables:


This query will return all rows from both the orders and customers tables, including any rows that do not have matching values. Any rows with null values for either table will be included in the results.

Edward Jones Investments SQL Interview Questions

Learn about the Edward Jones analytics team and how they use SQL to enhance business operations.

SQL Question 4: Calculating the Running Total of Clients' Investments

Edward Jones is an investment firm. They want to analyze client investments and see how the total investment amount of each client changes every month. Each investment line for a client represents a new investment or an additional investment to an existing product.

The task here is to write a SQL query that calculates the running total of client's investment by product every month, ordered by month in ascending order. If a client didn't invest in a new product or add more amount to an existing product in a certain month, this month should still appear for the client with the total investment amount carried from the previous month.

Create two tables named and .

Example Input:
client_idclient_name
1John
2Jane
Example Input:
investment_idclient_idproduct_idamountinvestment_date
111015000.0001/01/2022
211023000.0001/10/2022
311012000.0002/01/2022
421011500.0001/15/2022
521011500.0002/15/2022
Example Output:
monthclient_idproduct_idrunning_total
111015000.00
111023000.00
11Total8000.00
121011500.00
211017000.00
211023000.00
21Total10000.00
221013000.00

Answer:


<WRITEUP_OF_ANSWER>:

In the query, we are using the function as a window function to calculate the running totals of investments made by each client for each product. is used to get the month part from the . The window function is partitioning the data by and , and it's ordering the data by .

To practice another window function question on DataLemur's free interactive SQL code editor, try this Google SQL Interview Question: Google SQL Interview Question

SQL Question 5: What are the ACID properties in a DBMS?

ACID refers to the four key properties that are essential to the reliable and correct execution of database transactions. These properties are:

Atomicity: ensures that a transaction is treated as a single operation, and either all of the changes are made or none of them are! Basically, the database version of a "-FULL SEND-"

Consistency: ensures that the data is in a consistent state before and after a transaction is completed. For example, if wiring money to a friendly Nigerian prince whose fallen on hard times, consistency ensures that the total value of funds lost in my account is the same amount that's gained in the prince's account!

Isolation: ensures that the intermediate state of a transaction is invisible to other transactions. Back to the wiring-the-prince-some-money example, isolation ensures that another transaction sees the transferred funds in my account OR the princes, but not in both accounts at the same time

Durability: ensures that once a transaction has been completed successfully, the changes made by the transaction are permanent and cannot be undone, even in the event of a system failure. Basically, no taksies backsies (even if your system has a meltdown!).

SQL Question 6: Filter Customer's Data Based on Investment Threshold and Area

Edward Jones wants to focus on customers who have invested more than $5000 in a specific area. Your task is to return a list of customers that meet this condition. Additionally, the result should also filter customers who live in the 'St. Louis' area.

Example Input:
customer_idnameareainvestment
123John DoeSt. Louis10000
265Jane SmithNew York5000
362Robert JohnsonSt. Louis8000
192Julia DavisSt. Louis4000
981Charlie BrownLos Angeles6000
Example Output:
customer_idnameareainvestment
123John DoeSt. Louis10000
362Robert JohnsonSt. Louis8000

Answer:


This query filters the customers from the 'St. Louis' area who have made an investment greater than $5000. The WHERE clause is used to filter the records based on the conditions provided, and the AND operator is used to ensure that both conditions must be true for a record to be included in the result set.

SQL Question 7: Why is normalizing a database helpful?

There are several advantages to normalizing a database, including less redundancy, more flexibility, and better performance.

  • Less Redundancy: Normalization reduces redundancy by breaking down a larger, more general table into smaller, more specific tables. This reduces the amount of data that needs to be accessed for queries.

  • More Flexibility: Normalization makes it easier to modify the structure of the database, as there is less redundancy, so it allows you to make changes to one table without affecting others. This makes it easier to adapt the database to changing business needs (a very real reality at Edward Jones!)

  • Better Performance: Normalization can improve the performance of the database by reducing the amount of data that needs to be stored and accessed in a single table. This can result in faster query times and better overall performance.

SQL Question 8: Click Through Rates Calculation for Ad Campaigns

Edward Jones, a financial services firm, is running many digital ads banners in a new campaign targeting potential investors for their mutual fund products. For their campaign analytics, they are particularly interested in the click-through-rates (CTR).

CTR for a digital ad campaign is calculated as the number of clicks on the ads divided by the number of impressions (the number of times the ad was shown) times 100% to get the rate in percentage form.

Suppose we have two tables - that stores the impressions data, and that stores the data of ad clicks.

Example Input:
impression_idad_idimpression_date
110106/10/2022 00:00:00
210206/10/2022 00:00:00
310106/11/2022 00:00:00
410206/12/2022 00:00:00
510106/13/2022 00:00:00
Example Input:
click_idad_idclick_date
110106/10/2022 00:00:00
210206/10/2022 00:00:00
310106/12/2022 00:00:00
410106/13/2022 00:00:00
510106/13/2022 00:00:00

Answer:


This query first performs a FULL OUTER JOIN of the Impressions and Clicks table on the "ad_id" key to combine all data related to each ad.

Then it counts the number of impressions and clicks per ad from the combined data.

It goes on to calculate the Click-Through-Rate by dividing the total number of clicks by the total number of impressions times 100, with both counts typecast to to handle decimal point precision during division.

The result presents the Click-Through-Rate for each ad.

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

SQL Question 9: Monthly Average Investment by Clients

Edward Jones has a keen interest in knowing the average amount their clients are investing monthly to help them with forecasting their business. They have a with columns , , , .

Example Input:
transaction_idclient_idtransaction_dateinvestment_amount
632110002/11/2023 00:00:0015000
7643220002/20/2023 00:00:0045000
5326230002/21/2023 00:00:0020000
6432310003/11/2023 00:00:0035000
6341210003/20/2023 00:00:005000
4653220003/15/2023 00:00:0025000

Calculate the average investment by month for each client.

Example Output:
monthclient_idavg_investment
210015000.00
220045000.00
230020000.00
310020000.00
320025000.00

Answer:


This query works by first extracting the month from the using the function. Then, it aggregates the data by both the month and , and computes the average investment for each grouping using the function.

SQL Question 10: What are database views, and when would you use them?

Database views are created to provide customized, read-only versions of your data that you can query just like a regular table. So why even use one if they're just like a regular table?

Views are useful for creating a simplified version of your data for specific users, or for hiding sensitive data from certain users while still allowing them to access other data.

SQL Question 11: Customer Filter by Investment Type

Given a database containing the customer information, find all customers named 'Edward' who have made an investment in Bonds. We will use the keyword to match the pattern.

Here is the sample table:

Example Input:
customer_idfirst_namelast_nameinvestment_typeinvestment_amount
1201EdwardJonesBonds10000
7025JohnSmithStocks20000
8653EdwardDavisBonds15000
5621DianaChenMutual Funds30000
4875EdwardJohnsonStocks25000

Answer:

Here is the PostgreSQL query:


This SQL query will fetch all records from the table where the is like 'Edward' and is 'Bonds'. It uses the keyword to find the pattern 'Edward' under the column and operator to check if is 'Bonds'. Therefore, it will return all Edwards who have invested in Bonds.

Example Output:
customer_idfirst_namelast_nameinvestment_typeinvestment_amount
1201EdwardJonesBonds10000
8653EdwardDavisBonds15000

Edward Jones SQL Interview Tips

The key to acing a Edward Jones SQL interview is to practice, practice, and then practice some more! Besides solving the earlier Edward Jones SQL interview questions, you should also solve the 200+ DataLemur SQL Interview Questions which come from companies like FAANG tech companies and tech startups. DataLemur SQL Interview Questions

Each interview question has hints to guide you, full answers and crucially, there's an online SQL code editor so you can right in the browser run your SQL query answer and have it graded.

To prep for the Edward Jones SQL interview it is also a great idea to practice SQL questions from other banking & finanacial services companies like:

In case your SQL skills are weak, don't worry about diving straight into solving questions – go learn SQL with this interactive SQL tutorial.

SQL tutorial for Data Scientists & Analysts

This tutorial covers SQL topics like handling date/timestamp data and filtering data with boolean operators – both of which show up frequently during Edward Jones SQL assessments.

Edward Jones Investments Data Science Interview Tips

What Do Edward Jones Data Science Interviews Cover?

In addition to SQL interview questions, the other topics to prepare for the Edward Jones Data Science Interview are:

Edward Jones Data Scientist

How To Prepare for Edward Jones Data Science Interviews?

I'm sorta biased, but I believe the optimal way to prep for Edward Jones Data Science interviews is to read my book Ace the Data Science Interview.

The book has 201 data interview questions sourced from Google, Microsoft & tech startups. It also has a refresher on SQL, AB Testing & ML. And finally it's helped thousands of people land their dream job in data, which is why it's earned 1000+ reviews on Amazon and a 4.5-star rating.

Ace the Data Science Interview by Nick Singh Kevin Huo