TECHNICAL CODING INTERVIEW QUESTIONS FOR A DATA ANALYST FRESHER

Follow me on LinkedInGitHubYouTube

SOME TECHNICAL CODING INTERVIEW QUESTIONS FOR A DATA ANALYST FRESHER

-Anupam Shrivastava



1. Write a Python function to calculate the mean, median, and mode of a list of numbers.

2. Write a SQL query to find the top 5 products by sales revenue in a table named "sales_data", which has columns "product_id", "quantity_sold", and "unit_price".

3. Write a Python function to merge two sorted lists into a single sorted list.

4. Write a SQL query to calculate the percentage of orders that were delivered on time in a table named "orders", which has columns "order_id", "delivery_date", and "expected_delivery_date".

5. Write a Python function to find the most frequent item in a list.

6. Write a SQL query to calculate the average time between orders for each customer in a table named "orders", which has columns "order_id", "customer_id", and "order_date".

7. Write a Python function to remove duplicates from a list while preserving the order of the remaining elements.

8. Write a SQL query to calculate the percentage of customers who made repeat purchases in a table named "orders", which has columns "order_id", "customer_id", and "order_date".

9. Write a Python function to sort a list of tuples by the second element of each tuple.

10. Write a SQL query to find the number of orders and total revenue for each product in a table named "orders", which has columns "order_id", "product_id", "quantity_ordered", and "price_per_unit".

11. Write a Python function to find the top k elements from a list.

12. Write a SQL query to calculate the average revenue per order for each customer in a table named "orders", which has columns "order_id", "customer_id", "total_amount".

13. Write a Python function to flatten a nested list.

14. Write a SQL query to find the percentage of orders that included a discount in a table named "orders", which has columns "order_id", "customer_id", "order_date", and "discount_amount".

15. Write a Python function to calculate the factorial of a given number.

16. Write a SQL query to find the top n products by total revenue in a table named "orders", which has columns "order_id", "product_id", "quantity_ordered", and "price_per_unit".

17. Write a Python function to calculate the mean, median, and mode of a list of numbers.

18. Write a SQL query to find the number of customers who made their first purchase in a given month in a table named "orders", which has columns "order_id", "customer_id", and "order_date".

19. Write a Python function to find the common elements between two lists.

20. Write a SQL query to find the average time between orders for each product in a table named "orders", which has columns "order_id", "product_id", "order_date".



I trust that you have gained valuable insights from my blog.

Wishing you a fulfilling learning journey!

Thank you for reading. 


If you find my blogs informative and useful, please consider following me on 

GitHub (https://bit.ly/3ZFsW2E), 
and YouTube (https://bit.ly/3Jd0gss). [ Like, Share, & Subscribe ]

By following you'll receive notifications directly whenever I publish articles/post/videos on Python, Data Science, Machine Learning, SQL and more.

Comments

Popular posts from this blog

10 DATA SCIENTIST INTERN INTERVIEW QUESTIONS WITH ANSWERS

PYTHON PROGRAM TO GENERATE "HAPPY WOMEN'S DAY" USING MACHINE LEARNING