Sir, min Or max is not to be used in question where we need to find min salary. We can use select * from (select row_number() over (partition by name order by salary asc) as the_val from table) as N where N.the_val = 1
Sir, I have 1 doubt at the play run time 36:59 where during odd retrieval we are getting emp no 10, 12 and 14 also. But they are even not odd. Am i miss understood something? Can u please help me
Odd or even here meaning row number as even or odd , it has nothing to do with empno being odd or even. So let say we have 4 rows in a table when I need to get odd rows in that case row number 1 and 3 will be displayed. Hope this clarifies
Generally there could be 2 scenarios 1. Homogeneous system means source and target both are on the same database - you can use minus/except queries 2. Heterogeneous system where source and target are different - you have right some sort of scripting/code to compare the data from both
Thanks Sir .. I know using except we can check difference between source and target but they are asking it’s more records means query will take time that time how will u check ??
Table A (Student ID, Student Name, Student Age) table B (Student ID, Student Class, Student Section) Select Student Name, Student Class, Student Section where Student Age between 16 to 18 and Student Section is 'D' How to find out sir ?
Select a.studentName, b.studentClass, b.studentSection from TableA a, TableB b where a.studentId = b.studentId And a.studentAge between 16 and 18 And b.studentSection = ‘D’;
Or, Select a.studentName, b.studentClass, b.studentSection from TableA a, TableB b Inner join a.studentId on b.studentId where a.studentAge between 16 and 18 And b.studentSection = ‘D’;
Thanks for discussing these questions... 😊😊 Very much helpful for interviews
Thank you so much sir,
For helping us
Sir, min Or max is not to be used in question where we need to find min salary. We can use select * from (select row_number() over (partition by name order by salary asc) as the_val from table) as N where N.the_val = 1
Concept looks ok but SQL statement may not work if in Oracle .
Thank you
Sir, I have 1 doubt at the play run time 36:59 where during odd retrieval we are getting emp no 10, 12 and 14 also. But they are even not odd. Am i miss understood something? Can u please help me
Odd or even here meaning row number as even or odd , it has nothing to do with empno being odd or even. So let say we have 4 rows in a table when I need to get odd rows in that case row number 1 and 3 will be displayed. Hope this clarifies
@@etlqalabs5048 Thank you sir
Hi Sir, please add this question in your next upcoming video,, SQL Query Top 1 selling product from last 10 days
Probably you would like to share more details on the table structure and exact query
Thanks for this video. I have one question
If we have more than 5 lakh records how can we check data loaded from src to tar ??
Generally there could be 2 scenarios
1. Homogeneous system means source and target both are on the same database - you can use minus/except queries
2. Heterogeneous system where source and target are different - you have right some sort of scripting/code to compare the data from both
@@etlqalabs5048Sir, Can you cover heterogeneous sources where the src and target are from different databases using the scripting you mentioned.
Thanks Sir .. I know using except we can check difference between source and target but they are asking it’s more records means query will take time that time how will u check ??
Set operators can be used between 2 tables only right??
I think , yes only 2 tables at a time until you use brackets to consolidate the output and use that as a input
We can use 2 or more tables for set operators. 2 is in min requirement.
Table A (Student ID, Student Name, Student Age)
table B (Student ID, Student Class, Student Section)
Select Student Name, Student Class, Student Section where Student Age between 16 to 18 and Student Section is 'D' How to find out sir ?
Just use inner join on studentid in both the tables , you already wrote the query, just add this extract condition in where clause . That's all
@@etlqalabs5048 little confused sir?
Select a.studentName, b.studentClass, b.studentSection
from TableA a, TableB b
where a.studentId = b.studentId
And a.studentAge between 16 and 18
And b.studentSection = ‘D’;
Or,
Select a.studentName, b.studentClass, b.studentSection
from TableA a, TableB b
Inner join a.studentId on b.studentId where a.studentAge between 16 and 18
And b.studentSection = ‘D’;