3rd Max sal (co-related sub-query) Select e1. ename , e1sal From emp as e1 Where 2=(select count (distinct e2.sal) From emp as e2 Where (e1.sal< e2.sal);
Delete duplicate records: Delete from tablename where rowid in (select rowid from ((select id, count(name) from table_name group by id having count(name) >1) ) ) ; 3rd maximum salary: With qury as (Select emp_id, first_name, salary, dence_rank() over(order by salary desc) as Rnk from tablename) Select * from qury where Rnk=3 ;
types of schema 1) star schema 2) semantic shema These are two answers you but I am a little confused about whether this second answer is correct or not
For removing duplicates row from the table we can use self join, row_number() partition by windows function,then we can also use min function and add condition in where clause,we can also do it by using cte but it's long procedure and I would not recommend that.
3rd Maximum Salary SELECT * FROM ( SELECT department_id , hire_date , salary , DENSE_RANK ( ) OVER(partition by department_id order by Salary DESC) "max_salary" FROM employees ) WHERE max_salary = 3;
Creat a duplicate table? Syntax is Creat table # table name ( Emp_id number(5), Emp_namr varchar(20) ); Insert values in the table? Insert into # table name Values(40265,'John');
This is not a fresher interview 😑✨..
3rd Max sal (co-related sub-query)
Select e1. ename , e1sal
From emp as e1
Where 2=(select count (distinct e2.sal)
From emp as e2
Where (e1.sal< e2.sal);
select max(sal)
from emp
where sal
Delete duplicate records:
Delete from tablename where rowid in (select rowid from ((select id, count(name) from table_name group by id having count(name) >1) ) ) ;
3rd maximum salary:
With qury as
(Select emp_id, first_name, salary, dence_rank() over(order by salary desc) as Rnk from tablename)
Select * from qury where Rnk=3 ;
♥️♥️♥️♥️Sab maa baba ji ki jai is bharmand mein sab bharmand mein sabko acha or swast rakhiye ham sabke maa baba ji♥️♥️♥️♥️
when asked "what",..just list the "whats" dont try explaining all "whats" in detail. only when asked
Dense_rank function is wrong re check ✔️
Select country, max (salary) as total sales employee order by county,having county >50000;
Thanks with this i realized on which stage i am?
types of schema
1) star schema
2) semantic shema
These are two answers you but I am a little confused about whether this second answer is correct or not
Awesome interview and feedback! I have learnt a lot!
he is good guy & interviewer as well
How to handle null values in a column while inserting data we can use constraints not null
For removing duplicates row from the table we can use self join, row_number() partition by windows function,then we can also use min function and add condition in where clause,we can also do it by using cte but it's long procedure and I would not recommend that.
Very useful for freshers
Hi
How can i apply for job in this line..i have no rerfrnce yet..bt i completed my sql.
Go for Naukri
Delete Duplicate Values
DELETE From Table Name
Where row_id NOT IN ( SELECT MAX(row_id)
From table_name
GROUP BY column_name);
Thank you it's very useful🎉
Keep posting
madam or sir in u r company job are there myself santhosh reddy
These guys applying for freshers
Asking how are you to interview was personal 😅😅😂😂
nice interview got good knowledge
okay so for further details Hr will contacts you😂😂 ye bhaari tha Raao 😄
Pls share application support interview
Great👍👍👍
He's asking How are u? 😂 Is it a fresher interview
Ye fresher interview hai😮😂?
Great interview
❤❤❤❤
Nice
😮
Did he got selected or what
This is only mock interview
😂😂😂
Very freshers
Useless
3rd Maximum Salary
SELECT * FROM
(
SELECT department_id
, hire_date
, salary
, DENSE_RANK ( ) OVER(partition by department_id order by Salary DESC) "max_salary"
FROM employees
)
WHERE max_salary = 3;
Creat a duplicate table?
Syntax is
Creat table # table name
(
Emp_id number(5),
Emp_namr varchar(20)
);
Insert values in the table?
Insert into # table name
Values(40265,'John');
U can use insert into tbl_name followed by select * from previous_tblName.
Nice