IKishwar kokkiliinishwarkoki.hashnode.dev·Nov 25, 2023 · 3 min readSQL Problem of the day #11Problem statement: There is a queue of people waiting to board a bus. However, the bus has a weight limit of 1000 kilograms, so there may be some people who cannot board. Write a solution to find the person_name of the last person that can fit on the...00
IKishwar kokkiliinishwarkoki.hashnode.dev·Nov 23, 2023 · 2 min readSQL Problem of the day #10Table: Stocks +---------------+---------+ | Column Name | Type | +---------------+---------+ | stock_name | varchar | | operation | enum | | operation_day | int | | price | int | +---------------+---------+ (stock_name,...00
IKishwar kokkiliinishwarkoki.hashnode.dev·Nov 22, 2023 · 2 min readSQL Problem of the day #9Given a table of tweet data over a specified time period, calculate the 3-day rolling average of tweets for each user. Output the user ID, tweet date, and rolling averages rounded to 2 decimal places. Notes: A rolling average, also known as a moving...00
IKishwar kokkiliinishwarkoki.hashnode.dev·Nov 21, 2023 · 2 min readSQL Problem of the day #8Assume you are given the table below on Uber transactions made by users. Write a query to obtain the third transaction of every user. Output the user ID, spend, and transaction date. transactions Table: Column NameType user_idinteger spenddec...00
IKishwar kokkiliinishwarkoki.hashnode.dev·Nov 20, 2023 · 3 min readSQL Problem of the day #7Problem Statement: Replace the null value with the previous value. NOTE: null values are one thing that you have to deal with in your career right from the day you start working. So, better be equipped. Table creation and data insertion script: CREAT...00