title: MySql finding number of rows greater than or lesser than value
body: <p>I am trying to find a percentile rank using this formula.<code>(B+0.5E)*100/(N)</code> for 'X'. where x is the value what i have in 'emp' table.B=number of values below x, E=number of values equal to x , and N =total number of values in that table.
  i am having difficulties in finding 'B' AND 'E' in MySQL.. i have already tried with query but its not working..is it possible to make run a single query for whole formula?</p>