If you still don’t feel confident you understand your data enough, view the first couple of rows of your data (single or multiple tables). First, you have to list your assumptions about the data columns so that you know which columns you need to use.This framework has only three easy steps but it creates a logical pipeline for approaching any data science problems concerning writing code for manipulating data. We'll follow an easy framework that can be applied to any data science interview problem. Let's make the process of solving our interview question easier. There are also multiple ways in which this can be solved using SQL and that’s why we will cover several different approaches.įramework to Solve this Amazon SQL Interview Question But it’s also one of the important Amazon SQL interview questions because calculating a rolling average is a common data science problem. This is one of the hard Amazon SQL interview questions because it deals with a difficult concept of a rolling average and it has many additional requirements and restrictions that we need to account for. The first two months will not be a true 3-month rolling average since we are not given data from last year. What’s more, we shouldn’t include returns which are represented by negative purchase values and we need to output the month and 3-month rolling average of revenue, sorted from earliest month to latest month.įurthermore, this Amazon SQL interview question specifies that a 3-month rolling average is defined by calculating the average total revenue from all user purchases for the current month and previous two months. We’re being asked to find the 3-month rolling average of total revenue from purchases given a table with users, their purchase amount, and date purchased. Many questions also require data filtering and sorting using the WHERE and ORDER BY clauses. Another highly prevailing concept is data aggregation using SQL functions such as COUNT of SUM in combination with the GROUP BY clause or using the more complicated window functions. Nearly 70% of Amazon SQL interview questions concern data stores in multiple tables and ask for merging the data using JOIN clauses, Common Table Expressions or subqueries. The Amazon SQL interview questions test a wide range of SQL concepts but some notions appear in them more often. This is why it’s crucial to practice solving SQL interview questions before an Amazon interview. In fact, Amazon asks much less questions about theoretical concepts and their products when compared to other tech companies. Technical Concepts Tested in Amazon SQL Interview QuestionsĪs the knowledge and understanding of SQL are the key requirements for both data scientists and data analysts at Amazon, many interview questions require writing solutions using this language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |