Is there any way to find n-th highest salary without using any rank function/limit-offset at all?
@deepak1242817 күн бұрын
Thanks for the video, you can also use a CTE instead of creating temporary tables.
@echodelta768016 күн бұрын
Hi, Suppose there are two tables A and B. Each table has only two columns, ID and NAME. We have to get an output table that has rows in it as : 1st row from A 1st row from B 2nd row from A 2nd row from B 3rd row from A 3rd row from B .... and so on. What would be the query to generate this output table?
@akashkhantwal2430Ай бұрын
This video is very helpful, having import topics which is necessary ❣
@shinewithshreyashi2945Ай бұрын
please make more videos.. 😇
@TheMLMineАй бұрын
More videos coming soon
@shinewithshreyashi2945Ай бұрын
@@TheMLMine thanks
@megajop2000Ай бұрын
bro really helped me thanks!
@gospelmoto2833Ай бұрын
VERY NICE Video! you nailed it. You got a new sub here. Thanks for your informative tutorials, exactly what I needed.
@TheMLMineАй бұрын
Thanks. Glad it was helpful
@yashsharma5042Ай бұрын
The most awaited video, keep posting it like this sir ✨
@mihajlobozovic6977Ай бұрын
Im kinda confused. What happens with Anurag when i do recursive cte? How come you get 5 results when doing self join, but 4 when doing recursive cte?
@TheMLMineАй бұрын
When doing self-join every manager id was matched with every employee id, thereby also matching the manager id of Anurag with the employee id of Akshita. Whereas, in recursive CTE when we start with Rakesh (given emp id), we first match the manager id against Rakesh with the emp id of Shiva, then manager id against Shiva is matched with the emp id of Satyam, and so the chain builds up. The catch is, since Anurag's emp id is not the manager id of anyone in the chain, the entry for Anurag is not included. Thereby giving only 4 entries (which are part of manager - emp id chain) Hope it helps
@priyankachahande1909Ай бұрын
Beautifully explained !!!!!!!!!!! Keep doing great things. Its very easy to build logic, I can do it step by step. Really great
@TheMLMineАй бұрын
Thanks priyanka. Glad it was helpful
@akashkhantwal2430Ай бұрын
Thankyou sir for making this video ,its helping me a lot
@YashAgarwal-m4oАй бұрын
Yes stats video can be important as a data analyst can you do statistics video and there is a software for stats that's SPSS can you plz explore more on it
@TheMLMineАй бұрын
Hello, yes stats are an important part and will be covered soon. Thanks for mentioning it.
@rokithkumar49052 ай бұрын
Bro is there any chance of we getting statistics and basic econometrics as its very useful for data scientist and analyst after SQL.
@TheMLMine2 ай бұрын
Thanks for your feedback. I will come up with videos on that topic soon.
@yashikachugh41982 ай бұрын
In case of Ans 1) basis approach of row_number Here Aviral has 2 id's and where row_num is greater than 1 you deleted that record randomly, generally if nothing is specified what is the best way to explain the interviewer that how to decide which record to delete) also in that case the same solution would not work row_number >1, then should we use rank or dense rank function as it give same value same rank and we can pull those values and then decide? (just thinking) group by approach is fine
@TheMLMine2 ай бұрын
Good question yashika, - if nothing is specified (on which row to delete) : If you observe the row_num entries > 1 are the entries that may have been inserted at a later stage. You may justify to the interviewer that we are deleting only the latest rows if they are repeated, keeping the originally entered row (row_num=1) as it is. - If interviewer asks you to keep specific rows based on emp_id among the repeated values, you can simply do DELETE FROM emp WHERE emp_id IN (<id provided by the interviewer>) - I am not sure how you are thinking to use rank or dense_rank because you will need to anyways select which rank value to keep and you don't know at what rank the same values are there. However, in all the cases, you will either use emp_id column (since that is the only unique column we have) or a self created column (either row_num/rank/dense_rank) based on the type of row to delete. Hope it helps. Let me know if you have any further queries
@akashkhantwal24302 ай бұрын
Sir, Very informative video, your this playlist cover almost all the important question for fresher
@TheMLMine2 ай бұрын
Thanks akash. Good to know
@sweetsubha5142 ай бұрын
👌👌👍👍👍👍
@slamani36432 ай бұрын
Awesome Bro..thank you for updating this!!
@TheMLMine2 ай бұрын
Thanks. My pleasure
@TheMLMine2 ай бұрын
Let me know in the comments, if you have any doubts
@rokithkumar49052 ай бұрын
Bro what happened no new videos??
@yashsharma50422 ай бұрын
The way you explained Matplotlib was really great. As a first-timer, I learned a lot from your videos. Please keep publishing more content like this, it's really appreciated, sir
@TheMLMine2 ай бұрын
Thank you @yash. Glad it was helpful.
@yashsharma50422 ай бұрын
@@TheMLMine I have been looking for you on Instagram or LinkedIn so I can chat with you. I wanted to learn more about the data analyst field. If possible sir ?
@TheMLMine2 ай бұрын
Sure, you can connect me over 1) Linkedin: www.linkedin.com/in/ritesh-yadav-29745112a/ 2) Instagram: instagram.com/the_ml_mine/
@yashsharma50422 ай бұрын
@@TheMLMine thank you so much sir, I'll message you on LinkedIn 😊
@BharathKrishnaReddy2 ай бұрын
we want next video
@TheMLMine2 ай бұрын
It's published now :)
@akashkhantwal24302 ай бұрын
Sir,when i am applying this command why it is showing error for delete duplicate entry method which you apply first delete from emp where emp_id in(select emp_id from ( select *,row_number() over(partition by name,age,salary order by emp_id) as row_num from emp ) as table1 where row_num>1); this error is coming Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 0.016 sec
@TheMLMine2 ай бұрын
Hi akash, This error is because MySQL safeupdate setting is on. Safeupdate restricts certain types of queries that can unintentionally affect a large number of rows while deletion. And, using a WHERE clause with condition on a non-key column (that can have repeated values) could be one cause of that. What can you do? For now, you can turn the setting off in Edit->Preferences->SQL Editor->Uncheck Safe Updates (you can find the checkbox at the bottom most position in the window). Then restart MySQL and try again. Your query should work. Let me know if you face any issues
@shubhamsoni1742 ай бұрын
are not you gonna bring more pandas tutorials ? I mean there is still a lot left to learn about it.
@TheMLMine2 ай бұрын
Hi Shubham, so the idea was to cover basics for beginners. If you have any specific topics that you think should be covered, do write them below. Thanks
@akashkhantwal24302 ай бұрын
Amazing video sir, Very informative❤❤❤,Its help me alot
@TheMLMine2 ай бұрын
Glad to hear that
@akashkhantwal24302 ай бұрын
@TheMLMine sir how can i connect with you over the Instagram.
@rajm53492 ай бұрын
thnks fr xplng wndws fnctins clearly , if possble cn u xpln any healthcare project
@rajm53492 ай бұрын
thnq fr the nce xplanation. can u xpln health care project if possble
@TheMLMine2 ай бұрын
Hi raj, if you have any interview question related to any health care project, please let me know. I can make a separate video on that.
@ankitsrivastava66412 ай бұрын
Thank you for the video. Keep taking on new question.
@TheMLMine2 ай бұрын
Thanks ankit. Glad it was helpful
@akashkhantwal24302 ай бұрын
Sir, you are doing great and amazing video for upcoming data analyst❤
@TheMLMine2 ай бұрын
Thanks Akash. Glad it was helpful
@anandpathare64212 ай бұрын
very good bro , nice and keep it go on
@TheMLMine2 ай бұрын
Thanks anand
@vaishnav.lamaziya48983 ай бұрын
great job bro keep going
@TheMLMine3 ай бұрын
Thanks vaishnav
@slamani36433 ай бұрын
Wow.. Amazing..you covered everything of box plot .. if you continue this i am sure you will reach easily million subscribers!!
@TheMLMine3 ай бұрын
Thank you so much. Glad it was helpful
@anandshaw-ie3qk3 ай бұрын
Thanks you for sharing
@TheMLMine3 ай бұрын
My pleasure
@TheMLMine3 ай бұрын
Fun Fact: American mathematician John Wilder Tukey invented the boxplot in the 1970s
@Bigbakerscafe013 ай бұрын
Bro please make a video on sql for data analyst roadmap and which things to learn is mandatory for experienced data analyst 🎉❤
@TheMLMine3 ай бұрын
Sure. I will try to summarize the SQL learning as a roadmap in a separate video. Thanks for your feedback
@Bigbakerscafe013 ай бұрын
Bro your way of explaining is great 👍 subscribing from this video❤
@TheMLMine3 ай бұрын
Thanks bro
@arpanmahali35843 ай бұрын
I don't know whether the interviewer will ask me this type of questions or not.. but the way you are explaining is really amazing... learnt a new thing.. thank you so much..
@TheMLMine3 ай бұрын
Thanks. Glad it was helpful
@ankitsinha50883 ай бұрын
We can use dense rank as well or rank makes more sense. Can somebody explain?
@TheMLMine3 ай бұрын
Hi ankit, you are right. You can use dense_rank method as well. The only difference is if revenue of two products are same they will get the same rank value when using dense rank function while they will get different rank values when using simple rank function.
@willz26223 ай бұрын
Pls keep making these videos.
@TheMLMine3 ай бұрын
Feedback noted
@mahenderchilagani59163 ай бұрын
Very well explained, thanks for the videos.
@TheMLMine3 ай бұрын
Thanks. Glad it was helpful
@piudutta56653 ай бұрын
👍
@prajwaladhav32973 ай бұрын
I think using CTE for this kind of case will be a good practice, with cte as ( SELECT *, ROW_NUMBER() OVER (partition by emp_id ORDER BY emp_id) as row_num from emp ) DELETE FROM cte where row_num>1
@TheMLMine3 ай бұрын
Yes, you are right. However, "DELETE FROM CTE" is not supported in mysql, so we can not use that method here.
@prajwaladhav32973 ай бұрын
@@TheMLMine yes this will be useful for SQL Server users
@shubhamsoni1743 ай бұрын
Please try to bring more such videos 🙏
@TheMLMine3 ай бұрын
Sure shubham
@HariharanTamilarashanJeyasri3 ай бұрын
Hey bro would you please suggest any web based SQL practice
@TheMLMine3 ай бұрын
Hey Hari, you can refer to this website: sqlbolt.com/ for basic sql queries. For creating your own tables on server, refer this: www.sqlwebadmin.com/ (Although, I never worked with this before) Hope it helps.
@HariharanTamilarashanJeyasri3 ай бұрын
@@TheMLMine thanks so much response already try this but didn't get sql advance please help these
@TheMLMine3 ай бұрын
@@HariharanTamilarashanJeyasri No problem, can you please elaborate what do you want to achieve? Do you want to use cloud-based SQL database? If yes, are you willing to pay some subscription amount as well?
@HariharanTamilarashanJeyasri3 ай бұрын
@@TheMLMine thanks actually I am looking leaning sql advance function and practice plateform as well
@TheMLMine2 ай бұрын
Hi Hari, sorry somehow missed your comment. So, for the web based advance sql you can refer below links and choose your difficulty accordingly: 1) HackerRank - www.hackerrank.com/domains/sql 2) SQLPad - sqlpad.io/ 3) LeetCode - leetcode.com/problemset/database/ Hope it helps !
@dipakmani39643 ай бұрын
Great Explaination!!
@karthipalanivel63453 ай бұрын
Please explain mssql also while explining the mysql querys
@TheMLMine3 ай бұрын
Hi Karthipalanivel, I could do that but different servers support different syntax of queries. So, I could not do that in the same video. But, I will see if I can cover it in my upcoming videos. Thanks for your feedback.
@kirillnaumenko58063 ай бұрын
Amazing explanation and delivery! Thank you for your work
@TheMLMine3 ай бұрын
Thanks. Glad it was helpful
@nishantgautam15813 ай бұрын
bro i understand everything in sql , but when i start solving queries i take lot of time , i take lot of time to understand how shud i type it , any suggestion ?
@TheMLMine3 ай бұрын
Hi Nishant, it is normal in the beginning that it will take time to solve queries. That is why we need practice and practice. My suggestion would be to also understand the order of execution in which the commands are executed. It will help you understand the function of each commands and what happens in the backend (with order). You can refer this link, if it helps: sqlbolt.com/lesson/select_queries_order_of_execution And please practice questions without jumping at the solution and then understanding it backwards. Try to solve them by yourself first, be it wrong or right. Let me know if you need further help
@himanisrivastava18003 ай бұрын
1K SUBSCRIBERS
@TheMLMine3 ай бұрын
Thanks. And you are the 1000th subscriber
@safwanmohammed77153 ай бұрын
Best explanation
@Pavitra_ranebennur3 ай бұрын
DELETE FROM employee WHERE id NOT IN ( SELECT MIN(id) FROM table_name GROUP BY column1, column2, ... );