I want to select some rows and want to return those rows plus an additional column that display the count of selected rows. I am using a derived version of sql that doesnot allow me use OVER() AS
function as discussed here . I want something like for each element in selected column ,I want a count of it in entire table Like
For Initial column like this :
Fruits
Apple
Mango
Fruits
Banan
Final returned values :
Fruits NewColumnwithCount
Apple 2
Mango 1
Apple 2
Banana 1
Like in selected colum called Fruits, Apple appear 2 times, banana 1 times and Mango 1 time (in the entire selected column called fruits)