Hello,
I am trying to query the data inside this note using dataview.
The following text is all inside one single note (one single .md file) named Testing dataview.md.
I want to create a simple table that list all the alternatives, sorted by number of stars.
Things I have tried
I had tried the following:
```dataview
TABLE WITHOUT ID name, stars, updated
FROM "Testing dataview.md"
WHERE stars != ""
SORT stars DESC
```
But it doesn’t sort by stars. Also, it does not work when some of the rows does not have value, for example, no stars value, will unsort the rows.
So, how to I create records inside one single note?
Why stars != "" is not working? I also tried stars != null. Also tried WHERE stars.
Why SORT stars DESC is not working?
I played around with it a bit - as you want to query list items (in order to sort them), you have to collect all metadata that belong to the same item under a single bullet point:
```dataview
TABLE WITHOUT ID L.name AS name, L.stars AS stars, L.updated AS updated
FROM "Testing dataview.md"
FLATTEN file.lists AS L
SORT L.stars DESC