Based on discussion here - #9 (comment)
In ndt.ndt7, direction is indicated by which of the raw.Download / raw.Upload records is populated - for downloads only, filter on raw.Download.UUID IS NOT NULL (checking the leaf column rather than the whole record matters for cost).
While checking whether the KB already explains this, I noticed it doesn't, and that the same conflation exists in three published articles (test-ndt, getting-started-bigquery, research-guide), which compute download metrics from ndt.ndt7 without a direction filter, so they're averaging downloads and uploads together. test-ndt also recommends filtering on DATE(a.TestTime) for partition pruning, but the partition column is date - the same error we fixed in this PR. Could you file issues for these? As I said in my #9 (comment) above, this reinforces the need for KB articles to be reviewed and carefully verified before they're published.
Based on discussion here - #9 (comment)