Awesome lectures. Got better understanding of Databases from these lectures. Better to practice side by side on w3schools, where you can create your own database.
select D.supervisor as supervisor from emp-super A,emp-super B,emp-super C,emp-super D where A.person="Bob" and ((A.person=B.person or A.supervisor=B.person) and (B.person=C.person or B.supervisor=C.person) and (C.person=D.person or C.supervisor=D.person)) i have just started this course. idk if there is some command for iteration in SQL but as there is no such facility in relational algebra i have used such long methods also idk if the bracket syntax is correct but it should be so
* supervisor of supervisor of bob: select distinct e.supervisor from emp_super e, emp_super s where s.supervisor=e.person and s.person = 'bob' *all supervisors of bob select distinct e.supervisor from emp_super e, emp_super s where s.person = 'bob'
@@vii2sharma this is not a generic solution. U just made use of the fact that all entries in supervisors column are ans. for that simply select distinct supervisors from emp_super will work.
Because the select clause contained a non-aggregated attribute ID which was not present in group by clause. For query to be correct all the non-aggregated attributes present in the select clause must be a subset of the attributes present in the group by clause...
Awesome lectures. Got better understanding of Databases from these lectures. Better to practice side by side on w3schools, where you can create your own database.
Awesome teaching.Very good explanation sir
31:24 awesome explanation of group by and having 🔥✨
Arithmetic expression are used in select clause & Comparison based expression are used in where clause
Can anyone please explain projection which is at 13:12. I can't get the concept.
Answer for all supervisors(direct and indirect) of "Bob" please.
select D.supervisor as supervisor
from emp-super A,emp-super B,emp-super C,emp-super D
where A.person="Bob" and ((A.person=B.person or A.supervisor=B.person) and (B.person=C.person or B.supervisor=C.person) and (C.person=D.person or C.supervisor=D.person))
i have just started this course.
idk if there is some command for iteration in SQL
but as there is no such facility in relational algebra i have used such long methods
also idk if the bracket syntax is correct but it should be so
@@mahekshamsukha5212 what if we don't know the size of the table. then what will the query be?
@@aayushbhatnagar1999 i think we can import it to python and perform pandas to index you will get number and use for loop
second answer of the exercise...pls...
@@ankitkumarmajhi4020
select B.supervisor
from emp-super A, emp-super B
where A.supervisor=B.person and A.person='Bob'
Watching this at 2x speed
Hope RUclips had 5x too😢
@@muhammadmkm3093 use js to manipulate the speed
that is what im doinggg👀
An average student cannot understand these lectures . 😢
best video
Where can we find this ppt/pdf??
i like this video
Can any one can write queries to the assignment (supervisor table)
* supervisor of supervisor of bob:
select distinct e.supervisor from emp_super e, emp_super s
where s.supervisor=e.person and s.person = 'bob'
*all supervisors of bob
select distinct e.supervisor from emp_super e, emp_super s
where s.person = 'bob'
@@vii2sharma this is not a generic solution. U just made use of the fact that all entries in supervisors column are ans.
for that simply
select distinct supervisors
from emp_super
will work.
why was that erronous query at 28:38
Because the select clause contained a non-aggregated attribute ID which was not present in group by clause. For query to be correct all the non-aggregated attributes present in the select clause must be a subset of the attributes present in the group by clause...
@@jamespottex5197 can you please explain elaborately
at 21:38 instance ,
(not unknown)= unknown seems incorrect .
wont it be (not unknown )= known ??
The result will be unknown since the u r doing NOT operation on an unknown value
15:00
Watch this at 1.5x , Thank me later
6:00
I cannot understand the null values concept.