Data Interview Qs - Data Interview Questions: Problem #65

Breaking down customer transactions in SQL
SQL Database Querying Window Function

Given the following table containing customer transaction data:


Table name: orders

order_id channel date month revenue
0 1 Online 2018-09-01 09 100
1 2 Online 2018-09-03 09 125
2 3 In_store 2018-10-11 10 200
3 4 In_store 2018-08-21 08 80
4 5 Online 2018-08-13 08 200
5 6 Online 2018-10-29 10 100

Write SQL queries to answer the following:

  • Return all rows in the data table with transaction values over $101.
  • Return all rows in the data table with transaction values over $101 that were purchased through the Online channel.
  • Return all rows in the data table with transaction values that were either over $101 OR were purchased In_store.
  • Return the minimum transaction amount for both channels as well as the corresponding order id.



Want the solutions? Upgrade to premium to access detailed solutions to each problem (including this one, as well as the questions you've previously received).

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


Unsubscribe

Older messages

Data Interview Questions: Problem #64

Friday, September 4, 2020

Data Interview Qs Application feedback Data Analysis Python Pandas Data Manipulation Your team at Apple released a new feature that collects feedback when an app launches. As part of the Alpha Launch

Data Interview Questions: Problem #63

Monday, August 31, 2020

Data Interview Qs Chi square testing candy distribution Statistics Chi-square Test Suppose Candy Company XYZ produces lollipops. The company claims that 30% of the lollipops are cherry, 60% are grape,

Data Interview Questions: Problem #62

Friday, August 28, 2020

Data Interview Qs American Football Scoring Python Algorithms There are a few ways we can score in American Football: 1 point - After scoring a touchdown, the team can choose to score a field goal 2

Data Interview Questions: Problem #61

Wednesday, August 26, 2020

Data Interview Qs Twitch content creators SQL Database Querying You are working for a company like Twitch.tv. Twitch.tv is a live streaming platform, where content creators (eg the people creating

Data Interview Questions: Problem #53

Tuesday, August 25, 2020

Data Interview Qs Reddit comment activity SQL Database Querying Suppose you're working for Reddit as an analyst. Reddit is trying to optimize its server allocation per subreddit, and you've

You Might Also Like

Noonification: Read Code Like a Hacker With the SAST

Saturday, May 4, 2024

Top Tech Content sent at Noon! Get Algolia: AI Search that understands How are you, @newsletterest1? 🪐 What's happening in tech today, May 4, 2024? The HackerNoon Newsletter brings the HackerNoon

Weekend Reading — May the fourth

Saturday, May 4, 2024

This week we setup our new Minecraft server, play Spacewar, avoid burnout, wonder about Facebook AI spam, lose our passkeys, and claim stairs on the way back home. 😎 Labnotes (by Assaf Arkin) Weekend

Google lays off workers

Saturday, May 4, 2024

Plus: Tesla cans its Supercharger team and UnitedHealthcare reveals security lapses View this email online in your browser By Kyle Wiggers Saturday, May 4, 2024 Image Credits: Tomohiro Ohsumi / Getty

When It Rains, It Pours ☔

Saturday, May 4, 2024

Why the umbrella's design can't be beat. Here's a version for your browser. Hunting for the end of the long tail • May 04, 2024 Hey there, Ernie here with a refreshed piece about umbrellas

🐍 New Python tutorials on Real Python

Saturday, May 4, 2024

Hey there, There's always something going on over at realpython.com as far as Python tutorials go. Here's what you may have missed this past week: Python's unittest: Writing Unit Tests for

Microsoft Outlook Flaw Exploited by Russia's APT28 to Hack Czech, German Entities

Saturday, May 4, 2024

THN Daily Updates Newsletter cover Webinar -- Data Security is Different at the Petabyte Scale Discover the secrets to securing fast-moving, massive data sets with insights from industry titans

Stop spam texts today!

Saturday, May 4, 2024

Have you been receiving a ton of spam texts lately? In April alone, spammers sent out over 19.2 billion texts. Ever wonder where they get your info to begin with? Data brokers. They sell your address,

DeveloPassion's Newsletter #165 - She Said Yes ❤️

Saturday, May 4, 2024

Edition 165 of my newsletter, discussing Knowledge Management, Knowledge Work, Zen Productivity, Personal Organization, and more! Sébastien Dubois DeveloPassion's Newsletter DeveloPassion's

📧 Implementing API Gateway Authentication With YARP

Saturday, May 4, 2024

​ Implementing API Gateway Authentication With YARP Read on: m​y website / Read time: 5 minutes BROUGHT TO YOU BY ​ Supercharging Development With AI and APIs ​ ​Announcing Postman v11: Streamline API

Software Testing Weekly - Issue 218

Friday, May 3, 2024

Unit, Integration and End-to-End Tests 🔧 View on the Web Archives ISSUE 218 May 4th 2024 COMMENT Welcome to the 218th issue! I loved going through this discussion among software engineers: What is your