Data Interview Qs - Picking a survey group

InterviewQs

Picking a survey group

Forward this email to a friend or colleague and challenge them to solve it.

Hi, 

You work for a large hardware company (one that manufactures watches, computers, and phones) and you're trying to understand user sentiment towards the company's brand and the products. You decide to send out a survey to a random set of users across different products. Can you create a query that samples across the different product offerings? The output of your query should be user_id and group (e.g. the sampling group the user belongs to).

You have a table with all users and their registered devices. The schema of the table is below:

Table: user_devices

Column Name Data Type Description
user_id integer id of the user
devices array of strings lists the devices (watch, computer, phone)
device_ids array of integers id of the devices used by the user
user_create_time integer epoch time of the user's account
total_spend integer lifetime spend of a user
country string user country



 

You’ve accumulated 181 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one) + our new Case studies.


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe

Older messages

Replacing bad data with Pandas

Friday, August 27, 2021

InterviewQs Replacing bad data with Pandas Forward this email to a friend or colleague and challenge them to solve it. Hi, Suppose you are given a dataframe, df, that contains various negative values.

Coin toss patterns (state transition diagrams)

Wednesday, August 25, 2021

InterviewQs Coin toss patterns (state transition diagrams) Forward this email to a friend or colleague and challenge them to solve it. Hi, A fair coin is tossed repeatedly and independently. Find the

Smallest missing number in array

Monday, August 23, 2021

InterviewQs Smallest missing number in array Forward this email to a friend or colleague and challenge them to solve it. Hi, Write a function that outputs the smallest missing number in a sorted array

Item inventory

Friday, August 20, 2021

InterviewQs Item inventory Forward this email to a friend or colleague and challenge them to solve it. Hi, You are given 2 tables, the first one is named current_inventory, and contains has the current

PCA, Interia, and Silhouette plots

Wednesday, August 18, 2021

InterviewQs PCA, Interia, and Silhouette plots Forward this email to a friend or colleague and challenge them to solve it. Hi, Suppose you have the following data set which contains (1st tab) a list of

You Might Also Like

🤖 Will AI Gadgets Replace Our Smartphones? — 4 Ways to Use Excel in Daily Life

Sunday, May 19, 2024

Also: How to Declutter Your Google Search Results, and More! How-To Geek Logo May 19, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your

Daily Coding Problem: Problem #1446 [Medium]

Sunday, May 19, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. Given a set of closed intervals, find the smallest set of numbers that covers

RD#456 Data Fetching Patterns in Single-Page Applications

Sunday, May 19, 2024

Five patterns to help Single Page Applications fetch data from remote sources ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

C#506 .NET 9 LINQ Performance Edition

Sunday, May 19, 2024

The team has been working on improving performance ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

PD#574 Programming like it’s 1977

Sunday, May 19, 2024

128 bytes of RAM, no operating system, and limited types of sprites ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Defeating Mouse Lint 🖱️

Sunday, May 19, 2024

How optical mice scrolled past rubber balls. Here's a version for your browser. Hunting for the end of the long tail • May 19, 2024 Hey all, sorry this is running a little late. Last week's odd

Android Weekly #623 🤖

Sunday, May 19, 2024

View in web browser 623 May 19th, 2024 Articles & Tutorials Sponsored Webinar: Compiler Technology vs Wrapper Solutions The right mobile app protection secures apps and SDKs against threats such as

Does AI spell doom for the open web?

Sunday, May 19, 2024

Plus, a proposal for Melinda French Gates View this email online in your browser By Anthony Ha Sunday, May 19, 2024 Image Credits: Google OpenAI and Google both made big announcements this week —

Sunday Digest | Featuring 'Visualizing the Tax Burden of Every U.S. State' 📊

Sunday, May 19, 2024

Every visualization published this week, in one place. Visual Capitalist Sunday Digest logo May 19, 2024 | View Online | Subscribe | VC+ The Best of This Week's Visuals Presented by Voronoi: The

Setapp's alternative mobile App Store & Subconscious winding down

Sunday, May 19, 2024

AI's major alien concept is transparency, Setapp launches alternative mobile App Store, The Happiness Trinity, and a lot more in this week's issue of Creativerly. Creativerly Setapp's