အားလုံးပဲ မင်္ဂလာပါ။ ဒီနေ့ Day 19 အတွက်ကတော့ Leetcode ရဲ့ difficulties Easy level problem တစ်ပုဒ်ဖြစ်တဲ့ **511. Game Play Analysis I **ဆိုတဲ့ problem ကို ရွေးချယ်ထားပါတယ်။
1Example 1:2 3Input: 4Activity table:5+-----------+-----------+------------+--------------+6| player_id | device_id | event_date | games_played |7+-----------+-----------+------------+--------------+8| 1 | 2 | 2016-03-01 | 5 |9| 1 | 2 | 2016-05-02 | 6 |10| 2 | 3 | 2017-06-25 | 1 |11| 3 | 1 | 2016-03-02 | 0 |12| 3 | 4 | 2018-07-03 | 5 |13+-----------+-----------+------------+--------------+14Output: 15+-----------+-------------+16| player_id | first_login |17+-----------+-------------+18| 1 | 2016-03-01 |19| 2 | 2017-06-25 |20| 3 | 2016-03-02 |21+-----------+-------------+ဒီပုစ္ဆာ မှာတော့ Activity ဆိုတဲ့ table တစ်ခုပေးထားပါတယ်။ player_id ,device_id, event_date, games_played Column လေးတွေပါဝင်ပါတယ်။
"ကျွန်တော်တို့က player တစ်ယောက်ချင်းစီက login ပထမဆုံးဝင်တဲ့ရက်ကိုရှာပေးရမှာဖြစ်ပါတယ်။" ကျွန်တော်ကတော့ အောက်ပါအတိုင်းရေးဖြစ်ခဲ့ပါတယ်။
1**SQL**2 3SELECT player_id, MIN(event_date) AS 'first_login'4FROM Activity GROUP BY player_id;Player တစ်ယောက်ချင်းစီအတွက်ဆိုတော့ player id နဲ့ Group By လုပ်ပေးလိုက်ပြီး first date ဆိုတော့ Min function လေးသုံးပြီး event date လေးထည့်ပေးလိုက်ရင်အဆင်ပြေသွားပြီပဲဖြစ်ပါတယ်ဗျာ။ Video ကိုတော့အောက်က YouTube link လေးကနေတစ်ဆင့်ဝင်ကြည့်နိုင်ပါတယ်ဗျာ။ Stay safe and see you allပါဗျာ။
30 Days Of LeetCode Database Day 19 - 511. Game Play Analysis I
Watch on YouTubeDiscussion
Join the conversation
How do you feel about this article?
Comments
Sign in to join the conversation
Sign in to be the first to comment!
Share Your Article
Share with your professional network
Recent Articles

Day 2 - GitHub Actions ရဲ့ အဓိက Concepts များနှင့် Runner အကြောင်း
ပြီးခဲ့တဲ့အပတ် Day 1 တုန်းက ကျွန်တော်တို့ CI/CD ရဲ့ Concept တွေကို အကြမ်းဖျင်း ပြောခဲ့ကြပြီးပြီနော်။ ဒီနေရာမှာ လက်တွေ့မစ...
Day 1 - Software Development ကို ပိုပြီးမြန်စေမယ့် CI/CD
Software တစ်ခုရေးပြီးပြီဆိုရင် "ငါ့စက်ထဲမှာတော့ အလုပ်လုပ်တယ်" ဆိုရုံနဲ့ မပြီးသေးပါဘူး။ User တွေသုံးမယ့် Server ပေါ်ရောက်...

Secure AWS ECR Github Action Using OIDC
Modern DevOps နှင့် Cloud Security တို့မှာ အဓိကဖြစ်လာသည့် Authentication System ယနေ့ခေတ် DevOps, Cloud Engineering, CI/C...

Manual vs Automated Infrastructure: Why "useradd" Still Matters in the Terraform Era
DevOps careerကို လျှောက်နေတဲ့သူတိုင်း Terraform၊ Ansible စတဲ့ Infrastructure as Code (IaC) tools တွေရဲ့ အလုပ်လုပ်နိုင်စွ...
From Surviving to Thriving
“AI ကြောင့် developer အလုပ်ပျောက်သွားမလား?” ဆိုတဲ့ မေးခွန်းကို Junior developer တိုင်း စဉ်းစားဖူးကြမှာပါ။ ဈေးကွက်အခြေအနေ...

