profile pic # Data Analysis @ Amazon
Upvote 0 Downvote
Fetching a Field from Two Tables Data Analyst @ Amazon Difficulty Medium

Given two tables in a database, how would you fetch a field from the second table based on a related field in the first table? Provide an example using SQL JOIN.

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
Advanced SQL Query Data Analyst @ Amazon Difficulty Hard

Given a database with a table named 'Sales' containing columns 'SaleID', 'ProductID', 'Quantity', 'SaleDate', and 'Price', write an SQL query to find the total sales amount for each product in the year 2023. Additionally, rank these products based on the total sales amount in descending order and only display the top 5 products.

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
SQL: Utilizing Self Join and Window Function Data Analyst @ Amazon Difficulty Hard

Given a table named 'Employees' with columns 'EmployeeID', 'ManagerID', 'Name', and 'Salary', write an SQL query to find each employee's salary as well as their manager's salary. Additionally, use a window function to rank employees based on their salaries within their respective departments.

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
SQL Rank, Joins Data Analyst @ Amazon Difficulty Hard

Given a table named Sales with columns id, employee_id, and amount, and another table named Employees with columns id and name, write a SQL query to rank employees based on their total sales amount. The result should include the employee name and their total sales amount, along with their rank.

Input

Sales table:

id employee_id amount
1 1 100
2 2 200
3 1 150

Employees table:

id name
1 John
2 Jane
Solution:

Please sign-in to view the solution

Upvote 0 Downvote
SQL Joins, Execution Order, and Operations Data Analyst @ Amazon Difficulty Hard

Explain the different types of SQL joins, the order of SQL execution, and how you would perform SQL operations on a table to achieve a specific output. Provide examples.

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
Several SQL Queries and Analyzing Charts Data Analyst @ Amazon Difficulty Hard

Describe how you would handle several SQL query questions and explain how you would analyze a histogram and pie chart to present data insights.

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
SQL Basics, Statistical Concepts, and Business Metrics Data Analyst @ Amazon Difficulty Hard

Describe your understanding of SQL basic concepts such as Primary/Foreign Key, Joins, Union/Union All. Write SQL queries involving JOINs across 2-3 tables, Aggregation, Subqueries, Window functions, and CTEs (Leetcode- Easy and Medium). Explain statistical concepts and business metrics you have used in previous projects, KPIs you have built for analyzing data, strategies and tools to compare products, and how you would approach situation-based questions to improve efficiency and reduce query run time.

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
Advanced SQL: Consecutive Numbers and Date Segregation Data Analyst @ Amazon Difficulty Hard

Explain how you would use advanced SQL techniques to identify consecutive numbers and segregate absent and present dates.

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
SQL Coding Questions: Joins and Ranking Data Analyst @ Amazon Difficulty Hard

Two coding questions based on SQL. The first question involves using joins, and the second question involves ranking.

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
How to Join Tables in SQL Data Analyst @ Amazon Difficulty Easy

How do you join tables in SQL? Explain the types of joins and provide examples.

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
SQL: Highest Salary, Basic Joins, Window Functions Data Analyst @ Amazon Difficulty Medium

Given a table named Salaries with columns id, employee_id, and salary, and another table named Employees with columns id and name, write a SQL query to find the employee with the highest salary. The result should contain the employee's name and their salary.

Input

Salaries table:

id employee_id salary
1 1 50000
2 2 70000
3 1 60000

Employees table:

id name
1 John
2 Jane
Solution:

Please sign-in to view the solution

Upvote 0 Downvote
Comparing BI Tools and Knowledge of Machine Learning Data Analyst @ Amazon Difficulty Medium

What is the difference between Tableau, Power BI, and other BI tools? Do you have any knowledge of Machine Learning?

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
Python Scripting Data Analyst @ Amazon Difficulty Medium

Write a basic Python function to print a diamond of asterisks given an integer n representing the number of rows in the upper half of the diamond (excluding the middle row).

Input An integer n.

Example For n = 3, the output should be:

  *
 ***
*****
 ***
  *
Solution:

Please sign-in to view the solution

Upvote 0 Downvote
Excel Exercise: Pivot Tables, VLOOKUP, Filters Data Analyst @ Amazon Difficulty Easy

Describe how you would use Excel to perform tasks involving Pivot Tables, VLOOKUP, and Filters. Provide examples.

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
Forecasting Pricing for TV Model Based on Sales Data Data Analyst @ Amazon Difficulty Hard

Written question: How would you forecast pricing for this particular model of TV based on this sales data from last year?

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
Capping Seller Items and Selection Criteria Data Analyst @ Amazon Difficulty Hard

How would you put a cap on the number of items a seller is allowed to have on the Amazon marketplace? What would be the criteria for selecting which items stay on the marketplace if this limit was imposed and sellers were over the limit?

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
Linear Regression vs. Logistic Regression, R-Squared, P-Value, and SQL Query Data Analyst @ Amazon Difficulty Medium

Explain the differences between linear regression and logistic regression. What are R-squared and P-value? Provide an example SQL query.

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
Metrics for Evaluating Outbound Warehouse Performance Data Analyst @ Amazon Difficulty Medium

What kind of metrics do you want to monitor when you are taking charge of evaluating the business performance of an outbound warehouse?

Solution:

Please sign-in to view the solution

Upvote 0 Downvote
Ways to Eliminate Bottlenecks Data Analyst @ Amazon Difficulty Medium

What are ways to eliminate bottlenecks?

Solution:

Please sign-in to view the solution