I’m not quite sure if I’m entirely understanding your use case, but I think the are two constructs you need to know about: this and row.
this is used to address fields and values in the current file, as opposed to any of the files in your queries. So doing this.VA in your query would list the value of the field VA from the file where you run the query from.
However, I reckon you don’t want to type it out, so here enters row, which is kind of a pseudovariable allowing you access to the fields through stuff like row["holiday"] or this[holiday]. Note that these return two different things whilst using the same syntax of looking a variable by name. The first will return the actual field (in any of your queried files) called holiday, and the latter will return from current file (due to this), the field named by the contents of holiday.
Some last tips before tackling the query is that the value of the GROUP BY clause is stored in the variable key, and that you can intermediate store calculation using FLATTEN ... as something. Now we can do something like:
TABLE WITHOUT ID key as type, days, this[key] - days as remaining
AND file.day >= date(2023-01-01) AND file.day <= date(2023-12-31)
GROUP BY holiday
FLATTEN length(rows) as days