Are you aiming for the Big Tech companies like Google, Amazon, Microsoft, Facebook, Apple, etc.?
Of course, you are! It’s not even a question….
So, pump up those brain muscles
Because what you are about to read is not something you can find on the Internet.
It is solely coming from a man of experience, the man who himself is working at Google!
If you are aiming to get into the above mentioned companies, within the sphere of Data Science, Data Analysis, and Data Engineering, and you are doubting the importance of SQL, then this email is for you!
Before I begin, I have a question for you….
Let’s first discuss..
What’s SQL?
Basically, SQL helps you understand the “computer ki jabba jabba”
And reciprocally, translates your language “chips maang raha hai” for the computer.
Ab thori mushkil zubaan main…
It is Structured Query Language or "sequel," a database communication language.
SQL is the most convenient way to retrieve, add, delete, or change information from a database.
Why is SQL important for Data Science, Analysis, and Engineering?
If you are hoping to get into the big tech companies without learning SQL, then you can sleep peacefully knowing you will never get in.
Because it is one of the most crucial tools in all the 3 spheres of data…
Let’s take Facebook, for example…
About billions of people are a part of the platform from different continents, who understand different languages, who use the platform in their own style, who need user-triggered content showing on their feed, and what not!
I mean who is going to handle all of this? The Data workers, duh….
A Data Engineer uses SQL to create Data ka ghar (home) i.e. a Database and integrates it with other tools.
Hypothetically speaking…
Mr. Data Engineer using SQL will help you create a Database for Facebook users in Asia and integrate the mini databases from every country within Asia…
Then enters Ms Data Scientist, who identifies the right data source, extracts the data, and processes it in a descriptive manner…
End in line, Adnan Bhai, the Data Analyst joins the league and analyzes the descriptive data for business purposes…
And that’s how big companies break down the scary gigantic data into easy digestible chunks
And it is impossible to achieve it without SQL.
So, I come bearing….
1 question testing your query writing abilities
4 questions with to-the-point answers
5 Field Relevant Questions
about SQL that these big tech companies might ask you during the interviews…
1 question testing your query writing abilities
Table 1:
ORDERS (FACT): PRIMARY KEY(order_id, marketplace_id)
Sample data
Table 2
CATALOG (DIM): PRIMARY KEY(item, marketplace_id)
Sample data
Questions
Please write a query to return the total number of units sold and unique number of customer by marketplace and product group. Expected output columns: marketplace_id, product_group, total_units_sold, num_of_unique_customers
Get the top 10 items in terms of number of times sold which customers have bought with their first purchase in 2021 in the US.
Please write a query to return the total number of orders by monthly.
4 questions with to-the-point answers
You have an Employee table (with employee data) and a Site_location (with site location data) table. How would you merge data from the two tables to give a list of all cities that have 100 employees or less. How would you use aggregations, Where or Having clauses?
Expected response: Use site location left join employee so that you cover all sites, even the ones with no employee yet. Use group by “city”, and a distinct count of EID as the aggregation function, with a having clause to limit to the cities that have 100 or lesser employees.
What will be the output of a case statement when all condition checks are TRUE. For example, in the below case statement, what is the expected output when both <condition1> and <condition2> are TRUE?
CASE when <condition1> then “A”
When <condition2> then “B”
Else “C” END
Expected response: The case statement will execute sequentially, so will output the first True condition. From the ex, “A” will be outputted.
If table A has 10 items. Table B has all 10 items in A, but with a pair of duplicate copy i.e Table B has 20 items. (for eg. If table A has items {1,2,3} , then B will have {1,1,2,2,3,3} ) . How many rows will each of these operations yield?
A UNION B
A LEFT JOIN B
A INNER JOIN B
A RIGHT JOIN B
Expected response: (i) = 10 , (ii) = 20 , (iii) = 20, (iv) = 20
How do you give the 2nd highest salary for each of the departments using the windows function?
Expected response: Use dense rank function to determine the 2nd highest salary. Rank function may not work because it skips the next chronological ranking value if there is a tie in the previous rank.
5 Field Relevant Questions
Technical
What are some of the coding standards that you consider during your work?
Project execution
What strategies do you use to gather user requirements?
When do you consider a project as complete? What are the items in your checklist for project completion?
Customer interaction
Can you tell me about a time when you had to walk your customers through a dashboard that you build? How did you manage the interaction with leadership with more business acumen than technical?
Documentation
What are some of the main documents that you have produce (functional/technical)?
If you have read this email with a good concentration and even worked on the questions I shared….
Then, I can assure you, you are ready to be seated for an Interview in the Fortune 100 companies!
Let me know in the comments below if this helped you and also, if you’d like more of such content in the future!
Until then,
Inspired Analyst - signing off!