Тёмный

Most Common Sql Interview Questions 1 | SQL Advanced Questions | Ashutosh Kumar 

Ashutosh Kumar
Подписаться 19 тыс.
Просмотров 2,9 тыс.
50% 1

Sql one of the most important language asked in most of the analytics interviews, in this i will be solving sql questions which was asked to me in one of the company.
drop table if employees;
create table employees(
employee_name varchar(133),
salary integer);
insert into employees (employee_name,salary)
values ('A' ,'24000'),
('C',' 34000'),
('D',' 55000'),
('E',' 75000'),
('F',' 21000'),
('G',' 40000'),
('H','50000');
drop table if exists tble;
create table tble(
id varchar(133),
name varchar(133),
age integer);
insert into tble (id,name,age)
values ('1','a','21'),
('2','b','23'),
('2','b','23'),
('4','d','22'),
('5','e','25'),
('6','g','26'),
('5','e','25');
drop table if exists tble1;
create table tble1(
name varchar(133),
email varchar(133));
insert into tble1 (name,email) values
('A','FEEDCSEAWN@EMAIL.COM'),
('B','IYYRWIRYF@EMAIL.COM'),
('C','QZANB@EMAIL.COM'),
('D','POIJN@EMAIL.COM'),
('E','UTYVDHS09@EMAIL.COM'),
('F','VNJV6235263@EMAIL.COM'),
('G','039FNJHC65@EMAIL.COM'),
('H','2738BHSBX5GCS@EMAIL.COM');
drop table if exists tble2;
create table tble2(
ID INTEGER,
name varchar(133),
SALARY INTEGER,
MANAGERID INTEGER);
INSERT INTO TBLE2 (ID,NAME,SALARY,MANAGERID)
VALUES
('1','JOE','70000','3'),
('2','HENRY','80000','4'),
('3','SAM','60000',NULL),
('4','MAX','90000',NULL)
;
👉 Complete playlist on Advanced Sql
• Advanced Sql Concepts
👉 Complete playlist on Sql Interview questions and answers
• HackerRank SQL problem...
---------------------------------------------------------------------------------------------------------------------
Check out some more relevant content here
👉 How to Learn SQL
• How to learn sql for b...
👉 How to become a business analyst complete roadmap-
• Business Analyst Compl...
👉 How to become a data analyst complete roadmap-
• Data Analyst Complete ...
👉 Top 3 you tube channels to learn sql for free for beginners
• Video
👉 Rank ,Dense Rank, Row Number in sql -
• RANK - DENSE RANK - RO...
👉 Cross join in sql
• CROSS JOIN SQL
👉 union join in sql
• UNION IN SQL
👉 left join in sql
• LEFT JOIN IN SQL
👉 Right join in sql
• RIGHT JOIN IN SQL
👉 Inner join in sql
• INNER JOIN IN SQL
👉 Introduction to tables and databases in sql -
• INTRO TO TABLES AND DA...
👉 Aggregate Function in sql
• AGGREGATE FUNCTION IN SQL
👉 Functions in sql-
• IMPORTANT FUNCTIONS IN...
👉 String Function in sql
• STRING FUNCTIONS IN SQL
👉 CRUD operations in sql
• CREATE- READ- UPDATE-D...
👉 Autoincrement in sql
• Auto Increment in SQL ...
👉 Primary Key in sql-
• PRIMARY KEYS IN SQL - SQL
👉 Null and Default values in sql-
• NULL AND DEFAULT VALUE...
👉 Data types in sql-
• Data types in Sql - SQL
____________________________________________________________________
Fill the form below to subscribe yourself to the analytics jobs mailing list to receive regular job opening updates - docs.google.com/forms/d/e/1FA...
Why you should definitely fill the analytics job updates google form - • Job Openings into busi...
_______________________________________________________________________
Connect with me
📸Instagram - / ashutosh.analytics
💻Linkedin- / ashutoszh
_____________________________________________________________________
Comment down if you have any doubts
Please leave a LIKE 👍 and SUBSCRIBE ❤️ to my channel to receive more amazing content in data analytics and data science.
_____________________________________________________________________
🏷️ Tags
sql,
sql for data science,
sql for data analytics,
sql practise questions,
sql practise questions and solutions,
sql tutorials for beginners,
sql problems for data engineers,
ashutosh,
ashutosh kumar,
ashutosh kumar analytics,
sql problems easy,
sql problem medium,
sql problems hard,
sql window functions,
sql advanced questions,
rank functions in sql,
lag lead in sql,
sql interview questions and answers,
sql interview questions,
sql questions asked in interviews,
hackerrank sql solutions,
hackerearth sql solutions,
leetcode sql solution
🏷️HashTags
#sql #interviews #questions #solutions

Опубликовано:

 

4 июл 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@AshutoshKumaryt
@AshutoshKumaryt Год назад
Advanced sql concepts - ru-vid.com/group/PLbTF1OfX62c3RQ_ZFfyNBWVPdz_OWTMLG
@OmkarShinde-bz7oy
@OmkarShinde-bz7oy Год назад
there are multiple way we can fetch the third highest salary mostly in company use dense_rank you know
@AshutoshKumaryt
@AshutoshKumaryt Год назад
Correct
@prateekkumar-xc6uo
@prateekkumar-xc6uo Год назад
After very long time...g8 to see u back ...I hope now u will be more frequent ..🙂
@AshutoshKumaryt
@AshutoshKumaryt Год назад
Haha,sure
@anirbandatta3487
@anirbandatta3487 Год назад
Qus 3) Remove Duplicate rows should be remove all other rows that are repeated more than once by keeping one row...here it deletes all rows that are repeated more than once....
@gauravnarwal9135
@gauravnarwal9135 Год назад
@ashutoshkumaryt sir in the question 5 you do a mistake you find those employees who have a manager. But in this question, we find those employees who have no manager
@sauravlabade1366
@sauravlabade1366 10 месяцев назад
--6)Extract the characters after . from email : select name,email,right(email,len(email)-charindex('.',email)) as domain from tble1 ; 🙂🙂
@shubhamgupta9323
@shubhamgupta9323 10 месяцев назад
i was trying to solve in mysql server. It is showing that charindex does not exist. what is the issue
@prabhanshuneekhara3041
@prabhanshuneekhara3041 10 месяцев назад
in 15:00 if you want to solve it with windows functions the SELECT * FROM (SELECT id, name, age, COUNT(id) OVER (PARTITION BY id, name, age) AS w, ROW_NUMBER() OVER (PARTITION BY id, name, age) AS a FROM tble) AS b WHERE a < 2 AND w < 2;
@maheshaekunde3877
@maheshaekunde3877 Год назад
comment no 004- pls do one project on E-COMMERCE
@AshutoshKumaryt
@AshutoshKumaryt Год назад
thx for your comment , noted ur request
@EBKCS_SamarthGoyal
@EBKCS_SamarthGoyal Год назад
In question 1,I think rank() will not perform well ,in case if there are more than 1 employee with same salary. So instead of using rank () ,dense_rank() is right choice. Row_number() will also not work for above mentioned case. Can we write this query: Select emp_name,distinct salary from employee order by salary desc limit 1 offset 3.
@AshutoshKumaryt
@AshutoshKumaryt Год назад
Good observation, did this intentionally that someone can point this , if someone wants to know the diff between the three watch this ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-bi2qAVeSpBM.html
@prabhanshuneekhara3041
@prabhanshuneekhara3041 10 месяцев назад
the question 5 can also be solve with this select a.id, a.name, a.salary as esalary, b.managerid, b.name, b.salary as msalary from TBLE2 a, TBLE2 b where a.id = b.managerid and a.salary > b.salary;
Далее
Украшаю чехлы 🎀
00:51
Просмотров 336 тыс.
ПОЛЕЗНЫЕ ЛАЙФХАКИ В PLANTS VS ZOMBIES!
00:45
Why do databases store data in B+ trees?
29:43
Просмотров 32 тыс.
Украшаю чехлы 🎀
00:51
Просмотров 336 тыс.