Calculate the average word length. For the given set of words return the average word length.
Data Engineer Interview Questions
20,148 data engineer interview questions shared by candidates
Given a dictionary, print the key for nth highest value present in the dict. If there are more than 1 record present for nth highest value then sort the key and print the first one (alphabetically). N can be higher than the number of elements in the dictionary.
Write a function to count the number of times each character appears in a string and rewrite the string in that format. Eg. "I am back." should become "i1 2a2m1b1c1k1.1"
Given a list of ints, balance the list so that each int appears equally in the list. Return a dictionary where the key is the int and the value is the count needed to balance the list. [1, 1, 2] => {2: 1} [1, 1, 1, 5, 3, 2, 2] => {5: 2, 3: 2, 2: 1}
SQL questions on promotions, sales schema. what %age of products have both non fat and trans fat. find top 5 sales products having promotions what %age of sales happened on first and last day of the promotion Mysql was used and interviewer asked to if this can be done without subquery. Python:- [1,None,1,2,None} --> [1,1,1,2,2] Ensure you take care of case input[None] which means None object. find s in missisipi.
Write a function to return the number of times a character appears in a string. The character can be the empty string.
# Question 3: # -- % Of sales that had a valid promotion, the VP of marketing # -- wants to know what % of transactions occur on either # -- the very first day or the very last day of a promotion campaign.
Reversing a string
products sales +------------------+---------+ +------------------+---------+ | product_id | int |------->| product_id | int | | product_class_id | int | +---->| store_id | int | | brand_name | varchar | | +->| customer_id | int | | product_name | varchar | | | | promotion_id | int | | price | int | | | | store_sales | decimal | +------------------+---------+ | | | store_cost | decimal | | | | units_sold | decimal | | | | transaction_date | date | | | +------------------+---------+ | | stores | | customers +-------------------+---------+ | | +---------------------+---------+ | store_id | int |-+ +--| customer_id | int | | type | varchar | | first_name | varchar | | name | varchar | | last_name | varchar | | state | varchar | | state | varchar | | first_opened_date | datetime| | birthdate | date | | last_remodel_date | datetime| | education | varchar | | area_sqft | int | | gender | varchar | +-------------------+---------+ | date_account_opened | date | +---------------------+---------+ Question 1: What brands have an average price above $3 and contain at least 2 different products? Question 2: To improve sales, the marketing department runs various types of promotions. The marketing manager would like to analyze the effectiveness of these promotion campaigns. In particular, what percent of our sales transactions had a valid promotion applied? Question 3: We want to run a new promotion for our most successful category of products (we call these categories “product classes”). Can you find out what are the top 3 selling product classes by total sales? Question 4: We are considering running a promo across brands. We want to target customers who have bought products from two specific brands. Can you find out which customers have bought products from both the “Fort West" and the "Golden" brands?
Question 1: # Complete a function that returns the number of times a given character occurs in the given string # For example: # - input string = "mississippi" # - char = "s" # # - output : 4 """
Viewing 11 - 20 interview questions