Question: I have a view in my SQL Server database named `PictureCount`. I am getting data according the following query-

```
with result as
(SELECT CAST(Createddate AS DATE) AS StartDate, COUNT(ServicePictureID) AS TotalPicture 
 FROM PictureCount 
 WHERE ProjectID='11' AND 
 CAST(CreatedDate As DATE) BETWEEN '2014-10-31' AND '2014-12-05' 
 GROUP BY CAST(Createddate AS DATE)
)
SELECT 
   (CAST(DATEPART(YYYY, CAST(StartDate AS DATE)) as varchar) + '-' + CAST(DATEPART(MONTH ,CAST(StartDate AS DATE)) AS varchar)) AS StartDate, 
   TotalPicture 
FROM result

```

Data is appearing in the following format-

![enter image description here](https://i.stack.imgur.com/b18T0.jpg)

But I want data with group by `StartDate`. I am not able to apply `GROUP BY` clause. Please tell me if anyone knows about it. 

Thanks in advance.

Answer: 
Give the cell a class, then select by class:

```
$('textbox').val($(e.target).closest("tr").find('td.myClass').text());

```

Or to use the attribute you mentioned in comments:

```
$('textbox').val($(e.target).closest("tr").find('td[aria-describedby="yourValue"]').text());

```
```
this may help you
$('textbox').val($(e.target).closest("tr").children().eq(4).text());

```