- 6/23/2025
14 SQL Practice Session 15 Jun 2025 Part - 2
Category
📚
LearningTranscript
00:00yes
00:00yes
00:02yes
00:03yes
00:04yes
00:05yes
00:06yes
00:07yes
00:08yes
00:09select
00:10top
00:11select
00:12last
00:13three record
00:14how is it
00:15two-four questions
00:16no question
00:17yes
00:18how is it
00:21how is it
00:23how is it
00:25how is it
00:26how is it
00:28select
00:29top
00:30three
00:36there
00:38select
00:39top
00:40three
00:41start
00:44from
00:45EMP
00:46huh
00:47order
00:48last one
00:49order
00:50by
00:51EMP
00:52number
00:53EMP
00:55number
00:57descending
00:58descending
00:59descending
01:04top
01:05three
01:06top
01:07three
01:08last
01:09three
01:10last
01:11three
01:12two
01:13two
01:14two
01:15three
01:16two
01:17three
01:18two
01:19three
01:20two
01:21two
01:22three
01:23two
01:24three
01:25two
01:26three
01:27two
01:28two
01:29two
01:30two
01:31two
01:32three
01:33two
01:34three
01:35two
01:36two
01:37three
01:38two
01:39two
01:40three
01:41two
01:42two
01:43three
01:44two
01:45three
01:46two
01:47three
01:48two
01:49two
01:50three
01:51three
01:52two
01:53two
01:54three
01:55two
01:56seven
01:57nine
01:58two
01:59seven
02:00nine
02:01two
02:02seven
02:03three
02:04two
02:05two
02:06three
02:07two
02:08two
02:09three
02:10two
02:11two
02:12two
02:13three
02:14two
02:15three
02:17I think I can't do it.
02:20I think I can do it.
02:22I think I can do it.
02:24Okay, if this one was released,
02:33if this one was released,
02:35keep it like this.
02:37Okay?
02:38And here we go.
02:40Select star from.
02:44as QQ order by EMP number ASC, so is it going to happen?
03:00This is the answer, sir.
03:04Can you see?
03:06Yes, this is the answer.
03:10We can see it.
03:12This is the answer.
03:16Yes, it is not.
03:18Yes, it is.
03:20It is possible that we have descended and left.
03:24Then we have descended and left.
03:28Okay.
03:30Yes, it is.
03:32This is the answer.
03:34This is the answer.
03:36The answer is the answer.
03:38Yes, this is the answer.
03:40Okay.
03:42For what it is.
03:44Right after.
03:46Just save how tiered?
03:48Just
03:50No,
03:52No.
03:54No,
03:54Demeter
03:55No.
03:55No.
03:56No,
03:58No.
04:01Yeah.
04:02descending EMP number
04:06DHSC
04:08DHSC
04:10EMP number
04:12EMP
04:14EMP
04:16descending
04:18from
04:20from
04:22from
04:24from
04:26EMP
04:28from EMP
04:30EMP
04:32EMP
04:34AISY
04:36AISY
04:38AISY
04:40AISY
04:42COMPY
04:44SELECT
04:46STAR
04:48FROM
04:50BRACKET START
04:52BAND
04:54QQ
04:56WHERE
04:57ROW
04:58NUMBER
04:59WHERE
05:00ROW
05:01NBR
05:02LESS THAN
05:03OR
05:04EQUAL TO
05:053
05:06TAP
05:07कैसे
05:08LESS THAN
05:10OR
05:11EQUAL TO
05:123
05:13OR
05:14EMP
05:15EMP
05:16NUMBER
05:17EMP
05:18NUMBER
05:19EMP
05:20NUMBER
05:21EMP
05:22NUMBER
05:23EMP
05:24EMP
05:25NUMBER
05:26EMP
05:27NUMBER
05:28AC
05:29Descending
05:30NUMBER
05:31oh
05:33Oh
05:34कमाल
05:35कर दिया
05:36Sanjeev
05:37कुमार
05:38हो गया
05:39नहीं
05:40लंबा
05:41सोच लिया
05:42नहीं
05:43लंबा
05:44सोच लिया
05:45क्या हुआ
05:46हुआ है
05:47you can run more less than a team I am from my descending order to the first rank
05:57highest employee number second my second okay yeah okay yeah I got it
06:05प्र प्र बोलो क्या किया है इसाने क्या है अच्छा अच्छा और फिर इसको
06:27कर दिया इंपलाए को ठीक है एभी हो गया ठीक है एक और भी हो सकता है ठीक है एभी ठीक है इसी को कूपी करो ठीक है यहां पर लिखो
06:44तो हो एर रो नम्मर ठीक है अगर मैं लिखता हूं सलेक्ट
06:57काउंट एस्टार फरम एंप यह हमें देगा फोर्टीन
07:05कि इस फोर्टीन देगा ना तो यहां पर लिखोंगा सलेक्ट इसको यहां कोपी करूंगा हो यह रो नम्मर
07:14ग्रेटर देन इसकल टू एक ची देखना इसमें अगर मैं मैं मैंनस थिरी कर दूंगा
07:25सोरी चलो यहां पर मैंनस थिरी ऐसे अगर मैं ऐसे कर दूंगा यहां पर कांटिंग हो रहा है ना
07:37और इसी को कोपी करके ग्रेटर देन इक्वल टू अगर मुझे मरे पास बारा रेकॉर्ड रहेगा मैंनस तूंग करूंगा तो हो जाएगा दस दस एगारा बारा तीन
07:58कि अरे यार यह तो इल्टा कर दिया तो इसको यहां पर एसेंडिंग कर दो या भी इसको कुछ भी करो चोड़े चोड़ दें यह एज़िप्टिष तो भी हमारा हो गया है ना
08:00foreign
08:16foreign
08:21foreign
08:29Okay, this was an extra source, okay, this one is saying, delete first 3 row from EMPTable, select star from EMPTable,
08:51this one is saying, delete 3 records, starting.
09:21How will it happen?
09:30This one is going to show you.
09:33Let me remove the 3 records.
09:39It is very simple, select top 3, star from EMPTable,
09:45this one is going to be the same, delete, this one is not going to work,
09:54then we can help it from city.
09:57I understand.
10:02Select star.
10:07Select star from EMPTable,
10:19I sign as a 69 99 75 21, 69 95,
10:36ne,
10:37with CTE as a 501,
10:41I sign as a 601,
10:46I sign as a 68 99,
10:48select star from CTE,
10:51then I sign as a 70 2aba,
10:53this one is going to change.
10:54It doesn't have that many,
10:55this is not supposed to change.
10:56We should do this one altogether,
10:57this one is going to change.
10:59we will delete this place.
11:03So here the number will be needed.
11:06Top 3
11:07row
11:09NB row number
11:16row number
11:17row number
11:18we will not have to do it.
11:20We will not have to do it.
11:21We will not have to do it.
11:22If we can do it.
11:23If we can do it.
11:24If we can do it.
11:25Let's do it.
11:26Top 3
11:27I said 3, if it will be top 5, then how do you do it?
11:36The number is possible to change, right?
11:39Yes.
11:40I can say that there is also something that happens,
11:42there is also something that happens,
11:43there is also something that happens.
11:45Let's do this first.
11:47Order by over.
11:50Order by EMPNO.
11:53Edge, Rho, NVR.
11:58Okay?
12:11O, R, D, E, R.
12:14Yeah.
12:17This is 3 records,
12:19but we don't have to see 3 records.
12:23We will do it like this.
12:29Is it like this?
12:31Yes.
12:32And then, in this case, we will select the top 3.
12:35Top 3.
12:37Top 3 cannot write.
12:39Star.
12:41Higher.
12:43Row NVR.
12:45Less than equal to 3.
12:47nvr less than equal to three i get three yes sir
12:58now you can keep it here and here you can write delete from cte
13:12like this
13:21now you have to see
13:23select star from
13:29e.m.p
13:35cut out three
13:43cut out
13:44yes sir
13:46cut out
13:47but you are saying that I want to do the top of the base
13:52bar now we will do the top of the base bar now we will do this
13:59with cte edge
14:03with cte edge
14:04if this is the number is the same
14:06then what we say is the implied number is the sequence
14:11then if the implied number is the alpha
14:13then it will not work
14:15right
14:15greater than
14:16yes
14:17less than
14:17it will work
14:18we know
14:19so
14:21now we will write here
14:23select
14:24top
14:253
14:27emp
14:31no
14:33from
14:35emp
14:37select star
14:39from
14:41cte
14:43and
14:44cte
14:45so
14:47we will write here
14:49max
14:51emp
14:53no
14:55is it? Yes sir, when it comes out, let me write here
15:05delete from EMP where EMP no less than equal to this
15:18is it? Yes sir, it will be done.
15:26Select star from EMP.
15:30Is it?
15:33If I run this again, what will happen?
15:38Yes sir, how did you do it?
15:49Yes sir, how did you do it?
15:50Yes sir, I told you, if you have to do it,
15:56if you have to do it, then it will work.
15:59Yes sir.
16:01If you have to do it, A is 112, B is 124,
16:05then you will have to do it.
16:07Because it is greater than or less than our number date.
16:13Yes sir.
16:15And when we have done this, we will make the top three pass I will make it.
16:26Then you will create a top three pass,
16:271-82778-7788-787-839-789-789-839-789-789-839-839-839-8.
16:34Yes sir.
16:36And I will run this again.
16:38yes sir, if I remove max from this, what will it be?
16:487839
16:527839
16:55So if I write all three, I will select or delete them, which is equal to 7839
17:10I understand sir
17:12So now we have a record of our table, 8
17:19If I run this again, these three will be removed?
17:24Yes sir
17:26Did I run it?
17:31Is it gone?
17:33Okay
17:36So this is not the same, we will do our work in the sub-QD
17:41So this is easy to do with CT
17:47Where each employee order wise salary
17:50Delete record
17:52Okay
17:54Let's do the next day
17:58Okay
18:00So this is our number
18:02And the most important thing is that we are very understanding
18:04How do we understand?
18:06Yes
18:07I am going to say this again
18:08I am going to say this again
18:10It is a simple thing
18:12If we practice, we will come
18:14And the logic is also being made
18:18One question
18:20We are trying to solve two, three types of questions
18:22And we are trying to access
18:24CTE is such a thing
18:26Some people say it is tough
18:28But I have taught
18:30If you have to try and control the information
18:32If you are fully restricted
18:34CTE is common
18:36You will be controlled in certain pieces
18:37Because in CTE
18:38You will be very tired
18:39So in CTE
18:40You will be controlled by the data
18:41Let you are getting out of the data
18:42I am going to close the video, so the CT is better, so the CT will be controlled, so the CT will be controlled, right?
18:49Yes sir.
18:50So it's okay, I am closing today.
18:52Two videos are closed.
18:54Sir, stop recording, sir.
Recommended
1:08:17
|
Up next
1:44:20
1:03:00
1:31:31
1:11:49
1:31:40
1:08:19
1:58:00
1:10:48
1:20:45
21:29
1:41:17
56:07
22:29
1:46:36
1:17:04
22:00
9:02
34:43
10:15
4:38