I want to give serial no in my Query according to Group , how i can write for this query : AS per my below query it print group by data , but i want to give seq serial no per group like for first group  1 , 2 , 3 and then next group again 1, 2 , 3 like this

**select tour_no,version_no,itinerary_detail_no from  itinerary_detail group by tour_no,version_no,itinerary_detail_no order by  count(*) desc** 