CSV files can only be downloaded directly from any table, not by referencing data in another table. Airtable also doesn’t currently provide methods via scripting to create files for immediate download. A script would need to call a third-party service to create the file and host it temporarily, and then Airtable could present you with a link to the created file, or even attach it to a record if you wish.
If that sounds like something that you’d like to pursue, and you’ve got a budget for development of such a tool, message me directly to discuss the options.