Member-only story
Teams Power Users — Microsoft Asked SQL Question
Solving SQL Question asked by Amazon
3 min readNov 6, 2022
Introduction
- In this article we will solve Teams Power Users SQL question which is asked by Microsoft as per DataLemur website.
If you don’t know DatLemur then please do visit , it’s one of the best website to practice SQL questions and improve your SQL skills.
Question
- We have been given messages table which contains message_id, sender_id along with other columns.
- We have to find power users who sent most message in month of august in year 2022.
- Our output contains total message count for each power user, we have to output top 2 users.
Solution
- Since we need to output total number of messages sent by each user, that makes clear that we need to use group by sender and count message_id on that group.
- This would return below…