So, I am a techo, but I just can’t get the penny to drop for me on complex dataview queries. I feel like I am missing a key documentation page that would make me have the a-ha moment. I am better than average on my SQL, but that is always solved with joins and multiple tables. Not possible here.
On this occasion, I have a list of files, conveniently with date names. In the front matter of each file, is a property called “Team” that has a list of strings, which are the names of the people on that team on that day.
So I want a query that returns the list of team member names, and the number of times they have been on teams.
Something like
Paul 5
John 7
Sally 12
I kept thinking I needed to Flatten. I thought that was the magic I was missing, but I just end up with one name for each team, which is a long string with everyone’s actual name in that one long string.
I did a few things with rows.Team to try and group by, but I feel like I am missing the mark completely here.
As I have no particularly exciting code to share, because I feel like its just one thing I need to know, and then its a simple query, group by, sort… but I just can’t figure out how to do teh count from inside the list.
Thanks in advance.