Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
2 Methods To Calculate Median With SQL | How To Calculate Median in SQL Server
Play lesson

SQL Tips and Tricks - 2 Methods To Calculate Median With SQL | How To Calculate Median in SQL Server

5.0 (3)
42 learners

What you'll learn

This course includes

  • 15 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

In this video we will discuss how to calculate median using sql server. We will discuss 2 methods : 1- using row_number function 2- using percentile_cont function script: create table emp( emp_id int, emp_name varchar(20), department_id int, salary int, manager_id int, emp_age int); insert into emp values (1, 'Ankit', 100,10000, 4, 39), (2, 'Mohit', 100, 15000, 5, 48), (3, 'Vikas', 100, 10000,4,37), (4, 'Rohit', 100, 5000, 2, 16), (5, 'Mudit', 200, 12000, 6,55), (6, 'Agam', 200, 12000,2, 14), (7, 'Sanjay', 200, 9000, 2,13), (8, 'Ashish', 200,5000,2,12), (9, 'Mukesh',300,6000,6,51), (10, 'Rakesh',300,7000,6,50);

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere