Coding Interview Resources
52.1K subscribers
816 photos
7 files
501 links
This channel contains the free resources and solution of coding problems which are usually asked in the interviews.

Managed by: @love_data
Download Telegram
๐—ง๐—ผ๐—ฝ ๐Ÿฏ ๐—™๐—ฅ๐—˜๐—˜ ๐—ฃ๐˜†๐˜๐—ต๐—ผ๐—ป ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐—œ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ! ๐Ÿš€๐Ÿ’ป

These FREE certification courses can help you build strong programming skills and stand out from the crowd ๐Ÿ‘‡

โœ… Free Learning Resources
โœ… Certificate Opportunities
โœ… Beginner Friendly
โœ… Boost Your Resume & Tech Skills

๐ŸŒŸ Perfect for students, freshers, aspiring developers, data analysts, and tech enthusiasts.

๐Ÿ”— ๐—˜๐—ป๐—ฟ๐—ผ๐—น๐—น ๐—™๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜๐Ÿ‘‡:

https://pdlink.in/43DnP6S

๐Ÿ“Œ Start learning today and level up your career with Python!
๐Ÿง  SQL Interview Question (Moderateโ€“Tricky & Duplicate Transaction Detection)
๐Ÿ“Œ

transactions(transaction_id, user_id, transaction_date, amount)

โ“ Ques :

๐Ÿ‘‰ Find users who made multiple transactions with the same amount consecutively.

๐Ÿงฉ How Interviewers Expect You to Think

โ€ข Sort transactions chronologically for each user
โ€ข Compare the current transaction amount with the previous one
โ€ข Use a window function to detect consecutive duplicates

๐Ÿ’ก SQL Solution

SELECT
user_id,
transaction_date,
amount
FROM (
SELECT
user_id,
transaction_date,
amount,
LAG(amount) OVER (
PARTITION BY user_id
ORDER BY transaction_date
) AS prev_amount
FROM transactions
) t
WHERE amount = prev_amount;

๐Ÿ”ฅ Why This Question Is Powerful

โ€ข Tests understanding of LAG() for row comparison
โ€ข Evaluates ability to identify patterns in sequential data
โ€ข Reflects real-world use cases like detecting suspicious or duplicate transactions

โค๏ธ React if you want more tricky real interview-level SQL questions ๐Ÿš€
โค5