 I am Mrs. Sunita Dole working as an assistant professor in Computer Science and Engineering Department of Valshan Institute of Technology, Solaapur. Topic covered here is Structured Query Language, Basic Structured of SQL. So in this video, I am going to cover the basic structure of SQL using Select clause, which is a data manipulation language command. At the end of this session, students will be able to write the query for the given problem statement using the clause Select from where, the rename operation and the tuple variables. In previous two videos, I have covered first three DML commands Insert, Delete and Update. While in this video, I am going to cover the data manipulation language command Select. The basic structure of SQL expression consists of three clauses, Select, From and Where. A typical SQL query has the form Select a1, a2 up to an, from r1, r2 up to rm, where p. Here each ai represents an attribute and each ri is a relation and p is a predicate. If the where clause is omitted, the predicate p is true and the result of the SQL query may contain the multiple copies of some tuples. The Select clause lists the attribute desired in the result of a query. Example, find the name of all the branches in the loan relation. So SQL command Select branch name from loan. The result is a relation consisting of single attribute with the heading branch name. SQL name are case insensitive that is, we may use uppercase or the lowercase letters. SQL allows duplicates in the relation as well as in the query result. To force the elimination of duplicate, insert the keyword distinct after Select. Example, find the name of all the branches in the loan relation and remove the duplicates. SQL command Select distinct branch name from loan. The keyword all specifies that duplicates not be removed. Select all branch name from loan. Since duplicate rotation is the default, we will not use all. The asterisk symbol star can be used to denote all attribute. A Select clause of the form Select star indicates that all the attribute of all relation appearing in the from clause are selected. SQL command Select star from loan. The Select clause can contain the arithmetic expression involving operation plus minus multiplication and division and operating on the constant or the attributes of tuple. The query Select loan number comma branch name comma amount into 100 from loan would return a relation that is the same as the loan relation except the attribute amount is multiplied by 100. The where clause specifies the condition that result must satisfy. Example, to find all loan number for loan made at per raise branch with loan amount greater than dollar 1200. So, SQL command Select loan number from loan where branch name is equal to per raise and amount greater than 1200. Comparison result can be combined using the logical connectives and or and the not. The operands of the logical connectives can be expression involving the comparison operator less than less than equals to greater than greater than equals to and not equals to. Comparison can be applied to the result of arithmetic expression. SQL includes a between comparison operator to simplify where clause that specify that a value be less than or equal to some value and greater than or equals to some other value. Comparison find the loan number of those loans with the loan amount between dollar 900 and dollar 1000. So, using the between operator we can write this query as select loan number from loan where amount between 900 and 1000. Instead of the query using the comparison operator select loan number from loan where amount less than equals to 1000 and amount greater than equals to 900. Similarly, we can use the not between comparison operator. The from clause list the relation involved in the query. Example find the Cartesian product of borrower and loan. So, SQL command select star from borrower, loan. In example find the name, loan number and loan amount for all customer having a loan at the peri-rage branch. SQL command select customer name, borrower.loan number, amount from borrower, loan where borrower.loan number is equal to loan.loan number and branch name is equal to peri-rage. SQL uses the notation relation name dot attribute name to avoid the ambiguity in the case where an attribute appears in the schema of more than one relation. We could have written borrower dot customer name instead of customer name in the select clause. However, since the attribute customer name appears in only one of the relation name in the from clause there is no ambiguity when we write the customer name. Till now we consider the select from where clause. Now pause this video and reflect on these questions for minute or two minute and write your response. Once you return the answer to these questions then you can restart playing this video. The question is what happens if we omit the where clause in the select from where clause. I hope all of you have completed this activity. What happens if we omit the where clause in the select from where clause. So if the where clause is omitted then the predicate p is true and the result of the SQL query may contain the multiple copies of some tuples. SQL provides a mechanism for renaming both relation and the attribute. It uses the as clause taking the form old name as new name. The as clause can appear in both the select and from clauses. Example find the name, loan number and loan amount of all the customers rename the column name loan number as loan id. SQL command select customer name borrower dot loan number as loan id comma amount from borrower comma loan where borrower dot loan number is equal to loan dot loan number. Couple variables are defined in the from clause by placing it after the name of the relation with which it is associated with the keyword as in between. The keyword as is optional and may be omitted. So borrower as t equals to borrower t. Couple variables are most useful for comparing the two tuples in the same relation. Example find the customer name their loan numbers and the amount for all customers having a loan at some branch. SQL command select customer name t dot loan number comma s dot loan number from borrower as t comma loan as t where t dot loan number is equal to s dot loan number. These are some references thank you.