This example uses the qatt.ReferenceCalendar table to get all the dates for February in the current year and groups by the weekOfYear value.

The render helper group then takes the result of the query and does a group by weekOfYear. Inside the group helper the value of the grouping property can be accessed by using ``. In the example below it is being used as the 4th level header value.

The items in the group are then available via the items property. Below this is iterated though to get the date value and if it isWeekend. These are then used to display different outputs if isWeekend is true.

Example


```qatt
query: |
  SELECT *
  FROM qatt.ReferenceCalendar
  WHERE year = moment()->year()
  AND month = 2
template: |
  {{#group result by="weekOfYear"}}
  #### Week {{value}}
  {{#each items}}
  {{#if isWeekend}}
  - {{date}} πŸ₯³πŸŽ‚πŸΎπŸ₯‚
  {{else}}
  - {{date}} βš’οΈ
  {{/if}}
  {{/each}}
  {{/group}}
```

Live in Vault

query: |
  SELECT *
  FROM qatt.ReferenceCalendar
  WHERE year = moment()->year()
  AND month = 2
template: |
  
  #### Week 
  
  
  -  πŸ₯³πŸŽ‚πŸΎπŸ₯‚
  
  -  βš’οΈ