Question: I'm new to AngularJS; can someone help me why the below code is not validating the form?

```
<form name="reviewForm" ng-controller="ReviewController as reviewCtrl" ng-submit="reviewCtrl.addReview(product);" novalidate>
    <select ng-model="reviewCtrl.review.stars" required>
        <option value="">Rate the Product</option>
        <option value="1">1 Star</option>
        <option value="2">2 Star</option>
    </select>
    <textarea ng-model="reviewCtrl.review.body"></textarea>
    <input type="email" ng-model="reviewCtrl.review.author" required/>
    <div>ReviewForm is: {{reviewForm.$valid}}</div>
    <input type="submit" value="Submit" />
</form>

```

Answer: 
If for some reason you can't use `LEAD()` then this should work:

```
with T as (
    SELECT
        Name, Surname, Salary, TaxPercentage,
        row_number() over (order by TaxPercentage /* ??? */) as rn
    FROM Employees
)
select
    Name, Surname, Salary,
    nullif(
        TaxPercentage,
        (select t2.rn from T as t2 where t2.rn = t.rn + 1)
    ) as TaxPercentage
from T as t

```
Work with SQL Server >= 2008 if needed
<http://sqlfiddle.com/#!3/ec020/1/0>

```
Select o.Name, o.Surname, o.Salary
, TaxPercentage = case when o.id = 1 then o.TaxPercentage else null end
From (
    Select Name, Surname, Salary, TaxPercentage
    , id = row_number() over(partition by TaxPercentage order by Name, surname, Salary) -- update order...
    From Employees as e
) as o
order by o.TaxPercentage, o.id desc

```