Skip to playerSkip to main content
  • 1 year ago
Hi, this video will help you to SQL interview preparation.

Whatsapp Group Link- https://chat.whatsapp.com/Ck0eUZzs2FJBNhopD0B0Gt

SQL Script file : -
https://drive.google.com/file/d/1bWWybn-zPUes35zdyhC4fcHWHwJfP8cG/view?usp=sharing

Microsoft Excel Course: Advanced Excel Training

https://www.udemy.com/course/microsoft-excel-excel-from-beginner-to-advanced-m/?couponCode=FC0D30F148B3045E6E59

Category

📚
Learning
Transcript
00:00I have created a code SQL query with 8 questions.
00:06Create database booking.
00:10I am creating a table called Train.
00:16I have created a table called Train.
00:20I have entered and entered.
00:26I have entered and left the code.
00:36I have created a table called Personally.
00:40I have entered the passengers.
00:42I have entered.
00:44This is a passage that it has to be a passenger.
00:49There is a passenger name, passenger name, gender, age.
00:52Now the first question is display details of all trains which starts from NICTALI
01:05Select start from trains
01:13Now select start from trains where start is called to New Delhi
01:29These are the three trains which start from New Delhi
01:34Second question is display PNR number, passenger name, gender, age of passenger who is below 50
01:49Now the first question is passenger table
01:56Select start from passenger
01:58Select PNR
02:02Passenger name, gender and age from passengers
02:12Passenger is divided by 4th
02:14But you can write which age is below 50
02:19Or age is less than 50
02:25These are passenger who is less than 50
02:30Third question is to display total number of male and female passenger
02:37Select a star from passenger
02:44Passenger table
02:45Select gender count from passengers
02:56Group by
02:58Gender
03:004 female passenger
03:09And 5 male passenger
03:11Question number 4
03:13Display records of all passenger travelling in trains whose train number is 1205
03:231205
03:331-2-0-5
03:341-0-5
03:48display all the car of all passenger
03:54Travelling in Train number 120, not one table, passenger table, here we write, select star from passengers, where train number is equal to 12015,
04:21this is the two train, this is the passenger, this is the train, question number 5, find the first and last date of travel, travel date where passenger is made,
04:42send a few passengers to duplicate,
04:49this is the question, display records of all passengers travelling in train, no, this is the train,
04:56Display records of all passengers traveling in train. Find out first and last date of travel where passenger is female.
05:19Select a star from passengers where gender is equal to female.
05:39Now it's the first and last date. It's lost in the last travel where passenger is female.
05:55Minimax is the same. Minimax is the same.
06:05Minimax is the same.
06:09PNM is the same.
06:11Minimax is the same.
06:25Minimax is the same.
06:29Minimax is the same.
06:33Minimax is the same.
06:47Minimax is the same.
06:53Minimax is the same.
06:59Since next time, add Fcul anyhow or Minimax is the same etc.
07:08Minimax is the same.
07:19The week is six.
07:21If the data is different, then I insert one record in it.
07:28I make the same record in one passenger.
07:34This is the email.
07:37This is the female.
07:40This is the female.
07:44This is the female.
07:48This is the same record in this passenger.
07:54This is the same record.
07:57This is the same record.
08:00This is the same record.
08:02This is the same record.
08:05Count and station number where train lost.
08:09Station name minimum counted 1.
08:13This is the same record.
08:19Question number 6.
08:23What is the same record?
08:25Select star from trains.
08:31Count the end station number where train lost.
08:35And an station number where train lost.
08:37Station name counted 1.
08:39This one station needs to be.
08:41Count and end station number.
08:46OK OK.
08:47End station number is to be.
08:48End station number.
08:49Is to be.
08:50For the end station number.
08:53And station number count 1.
08:55I am going to select the ending from the train station, but in the station we are going to select the distinct D.I.S.T.I.N.C.T.
09:20This is the 5-6 stations where the train has ended.
09:27I am going to select the distinct D.I.S.T.I.N.C.T.
09:41This is all the station where the train has ended.
09:51But the question is that the station's minimum count is 1.
09:56Minimum count is 1.
09:58Number 3, 1.
10:01Number 5, find out train name, passenger name, passenger age between 50 to 60.
10:11Here is one table, no, here is one table, select star from trains, select star from passengers, here is the name of both tables, because the train name is in this table and the passenger name is in this table, and the join is in this table, you need to add 100% to the table.
10:39Find out train name, passenger name, where passenger age between, and we have one condition, so select star from trains T, and here is train name, so T dot, T name, join, join,
11:09passengers, which I have done, now where is the train name, so what are the same?
11:16Train number same, let's join P, on T dot, train number dot, P dot, TN, equal to, P dot, PNO, TNO.
11:46So, this is where is the train?
11:51Then, you need to click here, destination name, here is the train name, is the train name.
12:00It is a train name and passenger name, but if you need age, then you need to write it.
12:07Where p.age between 50 and 60
12:19This train name and passenger name is 50 to 60
12:29And if you need age, then we need to write p.age
12:36This is all passengers
12:40One more question
12:54Find out train
12:56Find out which train has maximum booking
13:31Join passengers p on d.dename equal to p.train
13:46Something wrong
13:53T.t name
13:56This train has come
13:59But if you need count
14:03Maximum
14:04Here we go
14:06Count star
14:09Now I have run
14:11Error
14:13Error
14:14This will be
14:15Because if you need to name a column
14:18Min max
14:20Min max
14:21Count
14:22Average
14:23Sum
14:24Group
14:25Group
14:26Y
14:27Must
14:28To
14:29Group
14:30Y
14:31T.dename
14:33T.dename
14:34T
14:37T.dename
14:43T.ename
14:44Now we will do maximum, maximum is 6, so it will be 6, so here we will give order y, and I will give this name as cnting.
15:02Order y cnting.
15:08Now we will give this name as descending, and then we will give this name as cnting.
15:18Now we will give this name as cnting, and then we will give this name as cnting.
15:30Now we will give this name as cnting.
15:40Now we will give this name as cnting.
15:46Now we will give this name as cnting.
15:56Now we will give this name as cnting.
16:02Let's see.
16:03This is my name.
16:05Let's see.
16:08Now we will give this name as bnting.
16:10Now let's see.
16:12Now let's see.
16:15I am going with a new full,신데
16:19Teacupppa.
16:21So I am following this jacket.
16:23So let's see.
16:25Let's see.

Recommended