SQL Query | How to find employees with highest salary in a department

  Рет қаралды 49,068

Learn at Knowstar

Learn at Knowstar

Күн бұрын

Пікірлер: 42
@rapo107
@rapo107 3 жыл бұрын
No words to explain how valuable this video... Take a bow ma'am..🙏🙏🙏
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Thanks so much!
@srat859
@srat859 3 жыл бұрын
Nice and great explanation more to come as videos. It helps a lot people like me
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Glad it helped
@BnfHunterr
@BnfHunterr Жыл бұрын
can we do this with cte
@kishorkumar007
@kishorkumar007 3 жыл бұрын
Thxs for sharing this. I always stuck in this scenario question. This video will help
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Glad it was helpful!
@alwaysbehappy1337
@alwaysbehappy1337 3 жыл бұрын
Thanks a lot...👍👍👍
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Thank you
@RajaSekhar-qs2lz
@RajaSekhar-qs2lz 2 жыл бұрын
Find out top 2 salaries from each department and list them out: Table1 ====== DEPT id dept_name Table2 ========== EMP emp_id dept_id # foreign_key salary
@ariumboroseno
@ariumboroseno 2 жыл бұрын
It is a great video, but it would be nice if you put .sql file in description so we can practice with same example 😁😁 just advice
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you. Sure, we will try to add the sql files for upcoming videos👍
@jirkablaha1562
@jirkablaha1562 Жыл бұрын
​@@LearnatKnowstarCould you please put the URL to that test database? I tried several but none were right.
@RK-wf7re
@RK-wf7re Жыл бұрын
Can't we use subquery to derive these outputs??
@selvan8000
@selvan8000 3 жыл бұрын
Nice video and helpful
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Thanks so much!!
@Sanath427
@Sanath427 24 күн бұрын
Hi in place of maxsal=1 I want max salary value for all records is it possible let me know
@ukkashs444
@ukkashs444 2 жыл бұрын
How to get max salary as well as min salary on department wise with employee other details as well.
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
You can use windows function - rank as explained in the second approach in the video. Max Sal = Rank = 1 Order sal desc Min Sal = Rank = 1 Order Sal Asc
@S17051985
@S17051985 2 жыл бұрын
Mam, how to find out number of transactions including current and historical transactions for an id if records are maintained in different database??
@pavanyeluri8728
@pavanyeluri8728 2 жыл бұрын
Can we use correlated sub query using each where clause with dept as the joining condition?
@Beyondhorizons-i5z
@Beyondhorizons-i5z 4 жыл бұрын
Very helpful
@LearnatKnowstar
@LearnatKnowstar 4 жыл бұрын
Thank you
@sibilyantv401
@sibilyantv401 3 жыл бұрын
Display the 35 years old and above with the highest salary ., pls help me
@MrRagerrrr7777
@MrRagerrrr7777 3 жыл бұрын
Can i please see the ERD table of this example? thanks!
@arshadpathan8040
@arshadpathan8040 3 жыл бұрын
Query : list the name of the employee and department having salary >50000
@hv0032113
@hv0032113 4 жыл бұрын
Great tutorial
@LearnatKnowstar
@LearnatKnowstar 4 жыл бұрын
Thank you
@rajeshbathula5505
@rajeshbathula5505 2 жыл бұрын
Ma'am, How to find the difference between punch in & punch out times of each employee, if those values are not in the same record?
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
You can try to do a self join to fetch the two related records.
@rajeshbathula5505
@rajeshbathula5505 2 жыл бұрын
@@LearnatKnowstar Thank you...
@TheVaibhavdang
@TheVaibhavdang 2 жыл бұрын
Nice video. Kindly share the same data aswell .That would be really helpful
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
The same query is covered in our latest tutorial on complex queries kzbin.info/www/bejne/e5CZmZR7lJZjm6c There is practice data available for that tutorial. Hope it helps!
@TheVaibhavdang
@TheVaibhavdang 2 жыл бұрын
@@LearnatKnowstar Thank you so much. In real time scenerio of HR database,I used cte to make a temp table joing employees and departments table to practice your question.😀😀 Thank you so much for the dataset.It will save some time.
@hafizqasimxprt855
@hafizqasimxprt855 3 жыл бұрын
show the ERD table
@jaitiwari241
@jaitiwari241 2 жыл бұрын
Maam where is sql script
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
You can find it here - know-star.blogspot.com/2021/01/sql-interview-queries-on-employee.html?m=1
@Abhinavkumar-og3xd
@Abhinavkumar-og3xd Жыл бұрын
Please speak in hindi.
@surajpatil3579
@surajpatil3579 3 жыл бұрын
Very helpful
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Glad to hear that
Deadpool family by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 7 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 17 МЛН
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 33 МЛН
Learn 12 Basic SQL Concepts in 15 Minutes (project files included!)
16:48
Deadpool family by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 7 МЛН