Topic
DQL10_flatten_groupBy_sort_and_TABLE
Summary
Main DQL
# | Code | Data type | In English | Remark |
---|---|---|---|---|
1 | TABLE WITHOUT ID | 1.1 To display the result as a table 1.2 Not To display the default ID columns, File or Group
|
||
2 | GF_Schrijver AS “Schrijver”, | a list | 2.1 To display the content of a field variable GF_Schrijver 2.2 To display the field label as “Schrijver” |
|
3 | length(rows) AS “Aantal boeken” | a list | 3.1 To display the content of a field expression like length(rows) 3.2 To display the field label as “Aantal boeken” |
“Aantal boeken” =“quantity of the books” |
4 | FROM “Referentie/Boeken” | FROM the Folder : “Referentie/Boeken” | “boeken” = “book” | |
5 | WHERE Schrijver != null | a list | WHERE Schrijver does not strictly equal null |
“Schrijver” = “Writer” |
7 | ||||
8 | FLATTEN Schrijver AS F_Schrijver | a list=>a non-list | 8.1 To break up a list like Schrijver in a file into each individual element in a file 8.2 To define a field variable F_Schrijver as each element of Schrijver of each note8.2.1 let F_Schrijver = each element of Schrijver of each page; |
|
9 | WHERE F_Schrijver != null | a non-list | WHERE F_Schrijver does not strictly equal null |
|
10 | SORT F_Schrijver ASC | a non-list | To sort by F_Schrijver in ascending order |
|
11 | GROUP BY F_Schrijver AS GF_Schrijver | a non-list=>a list | 11.1 To group by F_Schrijver 11.2 let GF_Schrijver = rows.F_Schrijver;
|
|
12 | SORT GF_Schrijver DESC | a list | To sort by GF_Schrijver in descending order |
DQL10_flatten_groupBy_sort_and_TABLE
Summary_code
title: DQL10_flatten_groupBy_sort_and_TABLE =>
collapse: close
icon:
color:
```SQL
TABLE WITHOUT ID
GF_Schrijver AS "Schrijver",
length(rows) AS "Aantal boeken"
FROM "Referentie/Boeken"
WHERE Schrijver != null
FLATTEN Schrijver AS F_Schrijver
WHERE F_Schrijver != null
SORT F_Schrijver ASC
GROUP BY F_Schrijver AS GF_Schrijver
SORT GF_Schrijver DESC
```
Reference
Summary
- Dataview Snippet Showcase: using a single Dataview inline field as a row of a table in the file
- How to break up multiple group Dataview inline fields in the file into individual groups?
- DQL FLATTEN by example: DQL50_alias_new_field_by_flatten: Twita: Help with Compound Dataview Values at 2022-07-15
- How to break up multiple group Dataview inline fields in the file into individual groups?