✨Link to my SQL e-book: imojo.in/rkajq9 ✨Link to 'Switch your career easily' e-book: imojo.in/1FL7KaG (Perfect for anyone willing to switch to a completely new field or to a different company in the Tech World)
@rajkiranboggala97224 жыл бұрын
I really appreciate your time and effort in sharing these (even though you are having cold)!! Thank you
@srinivasprasad77653 жыл бұрын
Ya true..👍
@ravindrabisht73723 жыл бұрын
That's called dedication...keep it up dear
@ShubhamKumar-mf4sg2 жыл бұрын
Having cold ..hahaha..nailed it bro
@tubepankajyou2 жыл бұрын
Such developers actually reach to top positions, appreciate it.
@karthikd21043 жыл бұрын
Seen so many videos in SQL messed up ...this one really understandable with clear explanation!
@adapass2 жыл бұрын
explanation is very clear by writing in paper which is unique in youtube. great job
@marvinmachitar72293 жыл бұрын
Wow! You are so good teacher. Was able to understand it more than other videos with fancy animation.
@tchelaa6894 Жыл бұрын
I have been stuck on this since yesterday. Thank you😎
@MoodyVideoGraphies2 жыл бұрын
kitni awesome hai yaar... So well explained... calm and soothing...
@umaannamalai32054 жыл бұрын
Thank you for the clear explanations! You made the concepts simple to understand. I’m excited for new videos.
@akashagarwal63904 жыл бұрын
Mam it would be great if you can take up topics or concepts which are really important like this though not much frequently asked in interviews and also it is useful for an engineer to know all these as well
@rakeshgopidi40662 жыл бұрын
It's a great post Sadia, no matter how many years of experience we have ,it's always a good revision for any one # Additional Reference There are also other ways to restrict the duplicates 1. UNIQUE 2. UNION 3. ROW_NUMBER | RANK () | DENSE_RANK () - Analytical Function 4. INTERSECT 5. MINUS 6. ROWID | ROWID + CORRELATED SUBQUERY 7. GROUP BY
@mastanshaik54793 жыл бұрын
Nice & simple way of understanding 👏👏 for new starters in sql ur videos are best .. thank you for ur efforts and time
@giridandi74802 жыл бұрын
Very nice.simple understanding way you explain so nice
@naveenshagala31365 жыл бұрын
Nice explanation with such a calm voice.
@crackconcepts5 жыл бұрын
Thank you 😃
@sushantpawar56353 жыл бұрын
शेंबडाचा त्रास होत असताना देखील खूप छान शिकवलंस🙏👍 thank you
@Rjjithin7773 жыл бұрын
Simply superb, doing a great job, simple and clear
@hidden5904 жыл бұрын
First method is easy to understand ...so I will go with the first method
@FitVisionTV3 жыл бұрын
First method will overload database performance. Avoid using select *
@bhavanikandikondamatam59263 жыл бұрын
Hello madam.. I have doubt in using temporary table.. Can insert distinct values in new table Drop the old table Rename new table as old table?
@saravananbhojan87503 жыл бұрын
Learned best way to query thanks for the video !!
@rajattalnikar61673 жыл бұрын
Thankyou so much. You've covered all the methods and discussed them in detail.
@zafariqbalunknown97862 жыл бұрын
Your efforts helped me a lot Thankyou mam
@husler74242 жыл бұрын
Watching in 2022, for placements as being CSE student. Thanks a lot, didi. Your explanation is just amazing.
@rajendrarajendra5832 жыл бұрын
Your explanation is superb. one small request what ever you explained can you explain in sql server . that is very use full to us.
@deepakaggarwal86243 жыл бұрын
Excellent, your solutions are just great and easy to understand
@akashverma16403 жыл бұрын
Thank you very much for you efforts... Must to be known things👌👌
@DeepakMeena-kz9bu3 жыл бұрын
over partition example was really helpful
@ankiturmaliya7286 Жыл бұрын
very good explanation..
@maryamfatima58822 жыл бұрын
excellent explanation
@boddanapalliavinash64182 жыл бұрын
Very good explanation keep it up 👍
@techninja94613 жыл бұрын
Excellent Explanation.....This video is really helpful.
@aeriesx47273 жыл бұрын
Absolutely brilliant explanation... Thank you so much..
@oic_Oracle_integration_cloud2 жыл бұрын
SO SIMPLE AND EASY
@joshyjohn96363 жыл бұрын
Well explained, It will be most useful video in this topic..
@hadireg3 жыл бұрын
a bit speedy but you're doing a great job!
@MUSKAN08962 жыл бұрын
This was very helpful! Thank you so much
@veerulinganagoudar34562 жыл бұрын
It's really helpful
@ganeshstars13 жыл бұрын
your explanation is good. I am watching most of the videios. for me 1 st method is showing error missing expression.
@nimmikcherian32423 жыл бұрын
Very detailed description... thanks
@umeshgolla27305 жыл бұрын
Excellent explaination..
@crackconcepts5 жыл бұрын
Thank you!
@meditationandrelaxationmus7413 жыл бұрын
Thanks it is very important interview question
@nausheen2923 жыл бұрын
Very well explained....Thank you 😀
@shivyogi8065 жыл бұрын
You have amazing, simple.way of teaching. God bless you and Thank you very much
@swapneelkambe20922 жыл бұрын
Good explanation
@Sriramlivz4 жыл бұрын
Nice Explaination. You have a lovely voice
@rosonerri-faithful2 жыл бұрын
Can we use the MAX(ID) method?
@mohansaivelagapudi9292 жыл бұрын
Thanks for Helping
@leesubiramaniyam27043 жыл бұрын
Explaining good & may be increase the volume (sound) better good
@mrf72833 жыл бұрын
very good effort and I appreciate your clips. However I have a question; suppose application messed up and gave same ID to two (2) different unique valid name. eg. 5001 to ABC and 5001 to XYZ and we want to keep both that is they should exists in our resultant with 2 unique IDs. Please don't get me wrong I am not trying to trick you, I had this real situation once with thousands of rows and was stuck.
@MohanGonnabathula Жыл бұрын
In that scenario, you need to add ID, name in partition. DELETE FROM ( SELECT *, ROW_NUMBER() OVER (PARTITION BY ID, NAME ORDER BY ID) AS Rno FROM emp ) AS E WHERE Rno > 1; This query will delete duplicate rows from the "emp" table where duplicates are determined by the combination of "ID" and "NAME" columns, keeping only the first occurrence and removing the rest.
@shwetabudake61443 жыл бұрын
Very well explained
@namratanikam75663 жыл бұрын
Well explained👍
@azharuddinluhar96673 жыл бұрын
3rd and 4th way will delete duplicate row from result set and not from actual table, now what to do for deleting duplicate rows from actual actual?
@sohailkat88673 жыл бұрын
Nice video, and it would be great if you could make a video on types of Analytical Functions in sql, thanks!
@richardconnolly42953 жыл бұрын
SUPER HELPFUL!
@jaganjayakumar48745 жыл бұрын
Clear explanation keep doing more videos👍
@praveenvadde2783 жыл бұрын
Good explanation. Can please explain and show by executing in the system.
@ravindrabisht73723 жыл бұрын
Your English is good
@mudasar86293 жыл бұрын
Thank a lots !!! :) Hope to see more videos from you.
@shubhamchoudhary54613 жыл бұрын
So informative...👍
@Aryan-ly5ho4 жыл бұрын
Helped me a lot Thanks 😁
@shubhamanand13474 жыл бұрын
your videos are awesome please make more videos on different topics
@shankar88163 жыл бұрын
Ek different positive way me le gye aap lecture ko.. Wldone
@sukritsen95305 жыл бұрын
Hello, I have a question, how to delete duplicate records with no unique key in mysql? Can this be done using the row_number function?
@chanduch89734 жыл бұрын
DELETE K FROM (SELECT *, ROW_NUMBER () OVER (PARTITION BY emp_id ORDER BY emp_id) AS RN FROM MyTable) K WHERE RN>1
@ravaliannaldas93202 жыл бұрын
Nyc video sister.
@akash_pal4 жыл бұрын
well Explained !! Thank you.
@bro_70794 жыл бұрын
kzbin.info/www/bejne/sHKcp2yio7VleKc
@tushardeepsingh49763 жыл бұрын
Hi..one question i have ..pls rply ASAP... I'm using MYSQL and MYSQL doesn't support select * into.. therefore i used insert into newtable select distinct * from old table ...here i faced one issue...i hv one tble with eid,ename and salary. eid field is PK and ename and salary has duplicate values ...now when i use insert into using distinct keyword it copies duplicate data as well ......i only want distict data to be copied ..i tried dropping PK but on column eid but i'm facing same issue
@tushardeepsingh49763 жыл бұрын
Hii.. Please clear one question in this video ..In CTE inner query ..you have not used * after select keyword ..you have directly written " select row_number()..." .... * aaega na after select ??
@maxiejane4 жыл бұрын
So helpful thank you for sharing!
@AmanKhan-ei4cg4 жыл бұрын
Thanks for such stuff🥰
@helmiboubaker27423 жыл бұрын
sorry but the third ways not working for me . this the query that i use delete from (select nom, row_number() over(partition by nom order by nom ) as count_num from fourniseurs)as tab where count_num >1; but the select query work fine i wander why is it not working i use workbench mysql :/
@mobileminimaster30153 жыл бұрын
delete from fourniseurs where nom IN (select nom from (select nom,row_number() over(partition by nom) as count_num from fourniseurs) ee where ee.count_num>1 );
@vrcks80663 жыл бұрын
ur voice is so nice😍
@yes-pg5dy3 жыл бұрын
Excellent madam pls do videos on power bi also pls
@dreambig16684 жыл бұрын
Hi just one suggestion you first way will always not would the solution for routine. N in your second way we have to design table with identify type then you will be able to access
@norbycreation18512 жыл бұрын
INSERT INTO temp_table SELECT DISTINCT * FROM old_table;
@saurabhbenbanshi34604 жыл бұрын
thanks you explained well...
@YPTechDATIA4 жыл бұрын
use insert into newtable select distinct * from oldtable; then delete * from oldtable; now insert into oldtable select * from newtable;
@mannu567 Жыл бұрын
Instead of MIN if we use Max then what will happen? I guess it will also remove duplicate
@labheshlalka96663 жыл бұрын
Why we can't use direct delete query whose count greater than 1
@vivekrahate25642 жыл бұрын
Thank u dear..
@CarlosRivera-mp7mm2 жыл бұрын
Excelente muchas gracias
@alekhyabodapati50033 жыл бұрын
where rn>1 is not a good practice use having rn> 1 instead of it. Good video
@sandysahu56512 жыл бұрын
The row_number() methodology is not working in snowflake db . anyone help me on this, how to resolve this like if we have to mention some alias name aslo and instead of rn>1 if we have to write alias.rn>1
@mangamanasvi54854 жыл бұрын
Good Job!, Thank you.
@kshathrugan52384 жыл бұрын
The first method ,the same query will it work in Oracle sql
@saisumanthnagasuri77412 жыл бұрын
What happen if there are more than 50 columns with the duplicate records Instead of passing all the columns names to the partition by clause Is there any way to put * . Any thoughts?
@aditiarjun5194 ай бұрын
Hello mam, deleting using CTE throws the following error.... "Error Code: 1288. The target table cte of the DELETE is not updatable" how to resolve it?
@mrrishiraj883 жыл бұрын
Great videos.
@arjunpawar45643 жыл бұрын
In third method : Can we access alias rn in outer query as well as use in where condition ?
@Pooja-pd1ee3 жыл бұрын
It won't work.
@shubhamshingi46573 жыл бұрын
Will 3rd and fourth approach delete row from original table or it will just delete from temp table/result sets ? can you please clear my doubt
@galymzhankenesbekov29243 жыл бұрын
i also had the same doubt, but decided to insert into temporary table first and then do operations in a temporary table instread of original DB
@octotube4633 жыл бұрын
Both of them won’t impact the actual table. 4th method is just removing the duplicates from the temp table, you can achieve by using a distinct query 😂. My guess for the 3rd query is it will remove both the duplicate and the actual record.
@qaz_testzaq_test81383 жыл бұрын
Good work, thanks
@dstar22115 жыл бұрын
superb...good job...
@crackconcepts5 жыл бұрын
Thank you!
@88pianissimo902 жыл бұрын
I think row_number( ) works slower ... right? If you have millions of records then this will work slow.
@digitalcode56852 жыл бұрын
THANKS
@antojeanston47815 жыл бұрын
it will be really helpful , if you do this on your system, please, it should be a live workout from your end, instead of explaining it on the written paper.
@priyakumar38025 жыл бұрын
She will explain the way she wants to explain.You should be thanking her instead of showing flaws
@music4u12352 жыл бұрын
so sNice tutorialt like that
@ramchinthakayala20924 жыл бұрын
How come only distinct values will stored in new table if use -- Insert into old_table select * from new _table ? pls explain
@yashgoswami53743 жыл бұрын
because than new table has distinct values
@rk-ej9ep3 жыл бұрын
Very nice
@stoic24543 жыл бұрын
any idea why a CTE is used when we can create temporary table using sub query.?
@octotube4633 жыл бұрын
Again, changes in the CTe table wouldn’t impact the actual table. 3rd and 4th queries won’t work.
@sathyasathyam69304 жыл бұрын
Super thank 🌹you
@HardikShah174 жыл бұрын
Perfect. Thanks.
@galymzhankenesbekov29243 жыл бұрын
also i did this DECLARE @employee TABLE (emp_id INT IDENTITY PRIMARY KEY, last_name VARCHAR(30) NOT NULL, first_name VARCHAR(30) NOT NULL, job_title VARCHAR(50) NOT NULL) INSERT INTO @employee VALUES ('Smith', 'James', 'Staff Accountant'), ('Smith', 'James', 'Staff Accountant'), ('Williams', 'Roberta', 'Sr. Software Engineer'), ('Weinberg', 'Jeff', 'Human Resource Manger'), ('Franklin', 'Victoria', 'Operations Manager'), ('Armstrong', 'Williams', 'Database Administrator'), ('Cromley', 'Eric', 'Recruting Manager'), ('Smith', 'James', 'Staff Accountant'), ('Richardson','John', 'Safety Clerk'), ('Horton', 'Michelle','Accounting Manager'), ('Washington','Mark', 'HelpDesk Technician') select * from @employee; with CTE as( select e.*, ROW_NUMBER() over (partition by emp_id order by emp_id) as rn from @employee e ) delete from CTE where rn >1 also did not work
@foolchandsonariwal42032 жыл бұрын
Madam derived table delete allow nahi karta he only u can use cte to delete duplicate record.