TECHNICAL CODING INTERVIEW QUESTIONS FOR A DATA ANALYST FRESHER
Follow me on LinkedIn, GitHub, YouTube
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".
Comments
Post a Comment