Open conorheffron opened 5 days ago
Code samples, snippets (may be possible to doas UI task only via Thymeleaf)
<table>
<tr th:each="count,iterator: ${product.paidService}">
<td th:text="${iterator.index+1}" />
<td th:text="${count.name}" />
<td>Paid</td>
<td th:text="${count.price}" />
</tr>
<tr>
<td colspan="3" />
<td><b th:text="${#aggregates.sum(product.paidService.![price])}" /></td>
</tr>
</table>
<span th:text="${#aggregates.avg(employee.reviews.![grade])}" />
<tbody>
<tr th:each="category : ${categories}">
<td th:text="${category.name}" />
<td th:text="${#lists.size(category.subCategories)}" />
<td th:text="${#aggregates.sum(category.subCategories.![#lists.size(products)])}" />
</tr>
</tbody>
AVG, SUM etc and group by for age values etc.