Transcript for:
SQL Interview Insights for Ascensure

Hello everyone this is Aman Agarwal and today I have brought for you Ascensure SQL interview one shot Before this I have made a video of OOPS interview one shot If you have not seen that video yet So first of all your work will be to cover OOPS interview one shot Because in that we have covered all the important questions of OOPS As asked in Ascensure Today in this video we have covered SQL which is a very important topic A wide topic which many students do not understand SQL and many companies SQL questions are asked So if you watch this video today Then you will not face any problem in Ascensure Because in Ascensure SQL questions and queries Can be asked from you So if you watch this complete video Then I guarantee that if you are asked any SQL question Then you will tell it easily And if you want to crack complete interview Then follow our complete Ascensure interview playlist Back to back videos are coming Complete the video well You will crack interview easily Let's start the video without any delay Our first question is What is database? Before studying SQL, we should know the database What is a database? What is a database? A database is an electronically stored systematic collection of data Now what is a database? It is a collection of data Every student is studying in a college You are studying in colleges Now there are so many students in such a big college Now there are so many students in such a big college So, all the data is stored in your college. What is this? This is data. This data is stored in your college. This is a complete database in which all the entries of all the students are stored. Their data, their roll number, their ID, their name. So, you have a database, which is a college database in which all the data is stored. So, this is called a database. Database is a systematic collection of data. The first word is very important, collection of data. It can contain any type of data including words, numbers, images, videos and files. Now you all know that as you have any data, this particular XYZ student's data, then brother here his name will also be there. Now what is the name? Name is in words. Numbers, some of his numbers will also be there. His account number will be there, what is his account number, his fees are being submitted or not. His images will also be there, which are images on your ID card. So that image will also be there, some videos will be there, some files will be there. So this is your database which is called collection of data and here we can have any type of data whether it is words, numbers, images or videos So we call it database I hope you have understood database because database is an important question you sit in any company first question will be asked on your database SQL is a very important topic mostly in 90% interview if you sit there SQL questions will be asked So come to the next question, question number 2, what is SQL? Now we are studying SQL, so first of all we should know what is SQL? Our full form of SQL is Structured Query Language. Many students will know and many students will not know. What is Structured Query Language? It is a programming language for storing and processing information in a relational database. Now what is this relational database? Our relational database is if you store any data in the form of tables these are my tables which have rows and columns we call this column and this is row this is row 1 this is row 2 this is row 3 how many columns are there? one is this, one is that, one is that, one is that so I have 5 columns and 3 are my rows so now you must have understood that if there is a term of relational database anywhere then understand that my database stored in my tables form so you must have understood the basic definition of SQL so come to the question number 3 what is DBMS? we will come to another video DBMS complete interview one shot tomorrow or day after tomorrow I will upload that video for you but in this video also because SQL is a part of DBMS so you must know what is DBMS DBMS stands for database management system DBMS is a system software responsible for creation, retrieval, Appudation and Management of the Database Before I explain you one thing In this video we will cover only SQL part We will cover SQL questions A separate video of DBMS will be uploaded tomorrow It will be in this playlist So DBMS questions will be different SQL questions will be different So in this video we will cover SQL questions And till tomorrow our DBMS video will also be uploaded So you both should cover both the videos properly Because database management system is a very important topic Now what is database management system? In database management system we can create, retrieve, update and manage our database You can play with your database You must be playing a lot in your childhood But here we can play with real world things If I want your entries I can retrieve your data Suppose If a student left the school Now I have to update his data I can update it And if a new student comes I can create a new entry I can create a creation And you must have heard The name of a database manager is DBA Database Management Architecture which is managed by your management of the whole database your college management will also have a DB which will manage the whole database of your college so this was our DBMS so I explained you a small picture of DBMS so come to the question number 4 RDBMS what is RDBMS? how is it different from DBMS? now we have studied DBMS, now what is RDBMS? RDBMS is stored data in the form of collection of tables I just told you about relational database Yes, the relational database we read is our RDBMS RDBMS means that we have stored all the data in the collection of tables So what will come in the table? In the table, there will be rows and columns So if you have stored any data in the table form Then we call it RDBMS And one more important announcement That we have brought for you Biggest Accenture Interview Session I will tell you once Biggest Accenture Interview Session Like many students upcoming interview is scheduled ok, you will also have coding round after that after coding round, in our Accenture there is a communication round I have uploaded a video for communication round so after coding round you will definitely reach interview round because our communication round is known elimination round so start your practice from the beginning whether you have cleared coding round or not start your preparation for interview because you don't get much time you won't get much time in between, your interview will be scheduled in 1-2 days so if you will keep preparation from the beginning then you will get a big edge now what is this interview session? we are hosting a biggest interview session for you guys this is going to happen on 8th September 9.30 pm in 9.30 pm this session will be This session will be on Sunday so that many students can come in this session. And our seats are very limited. So don't tell me later that seats are not being booked. You will get the link in the description to book seats immediately. We have very limited seats, 300 seats. I will tell you what to hide from you. 300 seats are very limited seats. Book it quickly and then don't tell me later in the comment section that seats are limited. We are not able to book. Now what we will do in this interview session I will explain you a lot of things I will tell you a lot of strategies How to crack an interview What things we should learn What things we should study What things can be asked in the interview Hope so that I will leave you an interview sheet I will bring some interview questions for you I can bring a sheet So quickly book the session We have kept the session in just 49 rupees You see Most of the students should come in this session and learn things and clear the censure and then give me a party. So, tell me in the comment section how many students are ready to give a party, how many students are ready to break the company and crack the censure. Now let's go to our next question. Question number 5. Write down various types of relationships in SQL. There are some types of relationships in SQL like one to one relationship, one to many relationship, many to one relationship, self referencing relationship. Now this relationship is not GFBF I will tell you earlier There is a relationship in SQL 1 to 1 relationship, 1 to many relationship many to one relationship self referencing relationship So you should know these terms So come to the next question, question no. 6 What is a query? A query is a request for data or information from a database table or combination of table Now what is query? I will show you queries in SQL Watch the video till the end And subscribe to the channel Because there is a lot of content for you If you subscribe, you will get a notification And as soon as you get a notification You have to watch the video immediately Because you will have more work and more videos So you will not be able to cover If you watch it immediately, you will understand things Now what is query You must have seen a query in SQL, I will explain it further. I will show you once by writing a query, select star from customer. What is customer? Customer is my table. I have written my query I have written the condition where id equal to 1 Now I have a customer table and an id If there is an id here then there are 3 id's Now I have written a query and requested the data To get the data of id 1 So it will get all the data Query is a query request in which we can retrieve the data so come to the question number seven what are entities and relationship this is most important question entities relationship and entity can be real world object either tangible or intangible that can be easily identifiable relationships relations or links between entities that have something to do with each other i'm a paper student or teacher Now these two entities will be there, one will be the student entity which is you and the teacher who is teaching you in the class. So these two entities will be there, now what will happen, now what is the relationship between the teacher and the student? That he is your teacher, he teaches you, so this will be my entity E1, this will be my E2 entity and this will be my relationship in between. What is the relationship? That the teacher is teaching you, so these are our entities, our relationship. Two entities are our relationships Entity is our real world object either tangible or intangible So whatever is real world object is my entity So come to the question number 8 and this question is most important question I will tell you first In 2024 batch of Ascension many students were asked this question in interview round and query was also written What is SQL where close? Where close has very important role in SQL Where close is used to filter records It is used to extract only those records that fulfill a specific condition. Now what I have applied here, I have applied wear close here. Now what is the work of wear close, I will tell you that too. Here you can see that I can filter my records with the help of wear close. Extract only those records that fulfill a specific condition. If I want any specific condition, If I want to give details of Rahul, Then I apply wear close, I can add Rahul's name and only get his entries If I want to add any specific conditions or criteria I can add them with the help of where close Now my syntax is going to be select Column 1, column 2, whichever column we want to extract And if you want to extract all the data Then here is an asterisk with which we can extract all the columns From table name, whatever is the name of your table Where condition, whatever condition you want to add Suppose I want to add id 2 So, whatever ID 2 is, all the data will be available. So, I hope you understood where close. Understand the definition once, read the syntax again. Now, if you want this sheet, if you want this PDF, then subscribe to the channel and in the comment section, comment the SQL interview PDF, I will share the link of the drive, whenever you have an interview, you can revise it the day before. So, come to the question number 9, what is SQL order by keyword? This is also a very important question. The order by keyword is used to sort the result set in ascending or descending order now what happened here, let me tell you you must have heard the name of sorting in your programming language we sort by the sort function but here if you want to sort something in SQL then from whom will I sort? here comes the term order by if I write it as order by then by default it sorts inside ascending if I write DESC here it means descending it will sort in descending order you must have understood this much interviewer may ask you how can I do by default if you write order by it will sort in ascending order by default and if you want to sort in descending order then you have to write DESC so come to the next question question number 10 what are SQL aggregate functions there are some aggregate functions in SQL mean Max, count, sum, average You must have learnt min and max in your programming language Min means return the smallest value Max means returns the largest value Count means returns the number of rows Sum is the total sum of numerical column Suppose this is my column Here is some data I need the full sum of this I can sum with the help of sum function I can sum with the help of sum function So, these were some aggregate functions. You must have understood everything. And do watch till the end of the video. Because at the end of the video, you will be covered with all the questions. queries which are most important queries which I am going to tell you so watch the video till end so guys come to the next question question number 11 what are constraints in SQL now what are constraints and what is the constraint term we will understand this thing see SQL constraints are used to specify rules for data in a table constraints are used to limit the type of data that can go into a table this ensures the accuracy and reliability of the data in the table Now I will explain it to you with a real world example Like your parents set a limit for you that you have to come home by 8 pm This is the limit If you come after 8 pm then you will get scolded and you will get to listen So what your parents did is they set a limit here This limit gives you a constraint So we call this limit as constraint Same as in our SQL Some specific rules are put on the data there is a limit that can go into a table with its help we get accuracy and reliability so these are very important terms and constraints I hope you have understood with the help of this real world example so come to question number 12 what is an index? now you must be knowing what is an index in programming language a database index is a data structure that improves the speed of data retrieval operations on a database table at the course of time additional rights and the use of more storage space to maintain the extra copy of data. Now with the help of database index, our speed of retrieval operations improves. Like we do array indexing, you must know that this is my array indexing, okay, the values are different, consider this is indexing. So with the help of indexing, you can retrieve your data very quickly. Your retrieval operation has increased. so in the same way our data retrieval speed gets improved and the cost of other storage space also gets reduced now let's go to the next question and this question is the heart of your SQL whole SQL is one side and this question is one side assume this is the heart of SQL let me tell you first if he is asking you SQL questions then your interview will not end without joins he can ask you query of joins so we will understand the query I will explain all types of joints So you have to understand all joints one by one Keep your focus on the video You will understand things well If you want notes, then I will tell you You can comment in the comment section Comment as well as interview PDF I will share the link of the drive You can do a revision before the interview And as I told you that Saison Saison link is in the description Stop the video and book now Because seats are limited Book it quickly, you will learn a lot. There is a big session and the price is also just Rs. 49. There is a minimum amount so that you can come. Because I know that if I keep the high price, then students will come but will earn less. So I want that all students benefit. So the price is so minimum that you waste Rs. 49 in momo food. But invest your amount in a good place. So from here you will learn. In 49 rupees you will learn 1000 rupees. This is my guarantee. Now what is joins? Now joins is a join clause is used to combine rows from two or more tables based on related column between them. Join is a very important term. With the help of join we can combine our rows from two or more tables. If I have more than two tables, I can combine it with the help of join clause. Now what are types? The most important thing is types. No one will ask you what joins are. Option. we will ask your queries, inner joins, these are all types, I will tell you once and we will also see the queries of each type. So first of all, we know SQL inner joins, many questions will be asked on it, so I put the most important here. The inner join keyword select records that have matching value in both table. Now what does this line say, matching value, now what is the matching value, this is my table 1, this is my table 2, I have mentioned you here for the pictorial representation too, so that you can understand things quickly. This is my table 1 and table 2. Here you can see the matching value of both the tables. This is the area of matching value. So, inner join will always give matching value of both the tables. Now, what will be its queries? Query is the most important thing. The interviewer will definitely write the query on the pen paper. You will not have to run any code on the desktop. Query will have to be run. If he makes you write anything, he will make you write on the pen paper. So, you will have to do the same thing. If you ask like this orally what is inner join then you should know the parry also Select column name from table 1 inner join table 2 remember this query I am telling you this already remember this query all the joins will have same query just little difference in name like here is inner join so left join will have left join right join will have right join so if you remember this query then all will be done select column name from table1 inner join table2 on this is my special condition table1.column name table2.column name so hopefully you will do this what left join will do? returns all records from the left table and matching records from the right table now this is my table 1 and table 2 now all the records in left table, give me this this is my left table and give matching records of right table so this is the portion of matching records so this portion will be our total portion in left join, now its query is going to be very simple now we saw the first query, it was same there but in left join So, as I told you, do one query and the rest of the query is same So, come to the SQL right zone Right zone records all records from right table and matching records from the left table There is one left table and one right table So, first of all, give me all the records from right table It says return all records So, I gave all the records to it And give matching records from left table This is matching records I also gave matching records So, in that, I took left and right records What happened in this? all data of right is required and matching record of left is required now let's see its query, it is very simple here right join will be given instead of left select column name from table1 right join table2 on table1.column name equal to table2.column name this query is very important, do it properly our joins are completed, we have read all the joins we have read all the types, right join, left join inner join, so I have told you all the things about joins If you do this much in joins then it is sufficient Now let's go to our next question What are triggers in SQL? A SQL trigger allows you to specify SQL actions that should be executed automatically when a specific event occurs in a database You have to remember one thing that our triggers will be executed automatically whenever an event occurs Just remember this line Execute automatically when event occurs So come to the question number 15 What is group by statement? What is group by statement? We have read an order by statement which is used for ascending order and descending order Now what is group by statement? Group by statement is open used with aggregate functions count, max, min, sum, average to group the result set by one or more columns Now I have a homework for you I have told you this before If you are watching the video properly then you will know the answer What is the function of average function? Comment in the comment section Whoever did the right comment will get a shoutout from me So what you have to do is, this is your homework in the comment section What is the work of average function? I want to check that how many things you have learned Because I have already told you, now I will check that how much you remember What is the work of average function? All the students watching the video in the comment section will comment now Stop the video, work of average function is to comment in the comment section Assume that I am your interviewer and I asked you and most importantly if you want to do a mock interview then you can do it, link is in the description there you will get the mock interview you can book the interview with me I will ask you questions, you will get a practice you will get to know what kind of interview exactly you will get then you will get a mock interview and you will get confidence link is in the description In that link you will find the services I have just told you about the link of the session Mock 1 to 1 interview This is a session of Rs. 99 for 1 to 1 interview In which you can do your 1 to 1 interview if you need If you feel that you are not confident Then you can conduct the interview So go and load book if you need so come to the next question does sql support programming language features sql is a language but it does not support programming why sql it is a command language we don't have conditional statement in sql like loops Have you ever seen loops in SQL queries? There is no such thing in conditional states. We only have commands which we can use to query, update, delete. So we use queries in it. SQL is a query language where we can update, delete and retrieve queries. So you must have understood this much. What are SQL ELISIS? This question is most important. The question I am putting most important is that the probability of coming in your interview is high. SQL ELISIS are used to give a table and a column in a table a temporary name. ELISIS are often used to make column names more readable and ELISIS is created with AS keyword. I will try to explain things to many students with real world examples Now, as your name is very big Suryapartap Singh Now who will take this big name? Your name of the house Your name of the house can be anything Your name of the house can be Chotu Anything can happen So let's suppose your name of the house is Chotu So now in our SQL query If the name is too big, we also give a temporary name of the house. Now this query is SQL Customer ID. Now I have given a small name to this customer ID, only ID. As ID. With the help of this keyword, I can create my analysis. So it was a very important question, it is asked a lot in interviews. So you should know. So come to the question number 8. What are SQL Constraints? I had told you about SQL Constraints earlier. But everyone is going to see what are the constraints. Default, unique. note null primary key I told you about constant that it will give you limitation with help of default we will get default value with help of unique constant allows only unique value now column will take only unique value not other value note null only allow none value no value will come it will restrict primary allows only unique value No non-null value will come. Only unique value will come. What is null value? How is it different from zero and blank space? This is the most important question. You understand null value as zero. But it is different from zero. Null value indicates absence of data. Pro-or-is, certain sale of data. Pro-or-is, certain sale of data. Now this is my table. if zero is there then it is not filled in table if null then it is null there is no value here absence of data so come to the last question this will be the last question of this video and we have learnt a lot in this video so let's see the last question how to delete a record from a table now this is a query with the help of this query we can delete any record in our table you can put a condition If you want to delete your condition, you can use your wear condition. I have also told you about wear clothes. So in this video, we learned all the things that were important for the ascensor. Ascensor SQL questions are completed. After this video, you don't need to watch any other video. Other videos are also coming on this channel. DBMS, Projects, HR questions, many more are coming for you for the interview. And the most important thing is to book the biggest ascensor interview session. I will give you the sessions. I want you to go there because you will get to know a lot of things there. You will learn a lot. If you want to crack the interview and you are serious about ascension, then go and book the session. And if you liked the video, then please like it. And if you have any doubt, you can comment in the comment section. So see you in the next video.